Skip to content

Commit 0d007e1

Browse files
committed
hpm sdk release v1.1.0
Main changes since 1.0.0 Tested Segger Embedded Studio Version: 7.10 - Changed: - docs: add new docs for rtd project. - soc: ip: enet: update the enet register file - soc: ip: adc16: update the adc16 header file - soc: hpm_romapi - Add APIs for configuring remapping, exip regions - drivers: enet: improve APIs related to PPS - drivers: adc: change adc bus blocking interface - drivers: adc: optimize getting oneshot result - drivers: src: update the default config for ADC12&ADC16 - boards: rename board-level APIs related to enet - components: enet_phy: rtl8201: update the register file - middleware: hpm_math: update dsp version - middleware: erpc: update to v1.10.0 - samples: uart: rename uart_dma_rx_idle to uart_software_rx_idle - samples: uart: add hardware rx idle detection sample - samples: multicore: erpc: core1 add sdk_compile_options(-O1) - samples: drivers: gptmr: update sample output. - samples: lwip: common: arch: ethernetif: update a calling function name - samples:drivers: adc: optimize oneshot handler - Added: - arch: add FPU related APIs - soc/board: add HPM6280 support - soc: HPM6750: acmp: add ACMP section - components: add mt9m114 support - drivers: add raw8 pixel format support - drivers: csr - Implement CSR driver - drivers: adc: adc16: support resolution setting - drivers/samples: add SDM/PLA/CRC/MCAN - drivers: I2C: add new API - drivers: adc: adc16: support resolution setting - drivers: enet: add enet control config for transmission - middleware: cherryusb: audio: update class driver and demo template - middleware: add mbedtls lib files with SDP acceleration - freeRTOS: add support for static allocation - samples: drivers: enet: add a pps demo - samples: cherryusb: add audio samples - samples: add the resolution parameter in all demos with ADC16 - samples: add rfft demo - sampels: i2c: add interrupt b2b samples - samples: drivers: i2s: add an i2s_master demo - samples: drivers: i2s: add an i2s_slave demo - samples : rom_api : add sw_gm_api filter - samples: add the resolution parameter in all demos with ADC16 - Fixed: - openocd: hpm6300evk: update sdram initialization. - drivers: trgmux: trigmux edge filter setting error - drivers: enet: fix register access error - drivers: adc16: fix the config error of ADC16_CONFIG1 - drivers: i2c: fix i2c timing configuration - drivers: SPI: fix SPI status API - drivers: fix gptmr cmp value don't minus one - drivers: mcan: correct the mcan ext_id filter issue - drivers: I2C: fix issue in i2c_master_address_read API - drivers: Self_ACK cannot be set in CAN driver - drivers: rtc rtc_config_alarm always return error code - cmake: correct source code compilation - soc: toolchain: gcc: initialize heap for SES - soc: gcc linker files: add NOLOAD keyword to noncacheable.bss section - soc: HPM6360: gcc: ld: correct noncacheable region name. - drivers: qei: Fix speed display always zero - middleware: freertos: disable global irq before vTaskStartScheduler - freeRTOS: fix trap when enable float feature - freeRTOS: fix tick lost - freeRTOS: fix segger project build warning - samples: drivers: i2s: fix CFGR config - samples: drivers: fix acmp toggle error - samples: lwip: fix the DHCP issue - samples: uart: fix irq_id judgment - samples: fix the order of uart pin configuration and clock configuration - samples: update spi dma sample - samples: drivers: sysctl: correct reset enable approach. - samples: fix dma_general_transfer sample memory out of bounds - samples: drivers: wdog: Fix logic issue on finding the nearest interrupt interval - sample: audio_codec: decoder_wav: add '\0' to fatfs path Signed-off-by: Ryan QIAN <[email protected]>
1 parent 9425336 commit 0d007e1

File tree

1,657 files changed

+541623
-61667
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,657 files changed

+541623
-61667
lines changed

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,88 @@
11
# Change Log
22

3+
## [1.1.0] - 2023-03-31:
4+
5+
Main changes since 1.0.0
6+
7+
Tested Segger Embedded Studio Version: 7.10
8+
9+
### Changed:
10+
- docs: add new docs for rtd project.
11+
- soc: ip: enet: update the enet register file
12+
- soc: ip: adc16: update the adc16 header file
13+
- soc: hpm_romapi - Add APIs for configuring remapping, exip regions
14+
- drivers: enet: improve APIs related to PPS
15+
- drivers: adc: change adc bus blocking interface
16+
- drivers: adc: optimize getting oneshot result
17+
- drivers: src: update the default config for ADC12&ADC16
18+
- boards: rename board-level APIs related to enet
19+
- components: enet_phy: rtl8201: update the register file
20+
- middleware: hpm_math: update dsp version
21+
- middleware: erpc: update to v1.10.0
22+
- samples: uart: rename uart_dma_rx_idle to uart_software_rx_idle
23+
- samples: uart: add hardware rx idle detection sample
24+
- samples: multicore: erpc: core1 add sdk_compile_options(-O1)
25+
- samples: drivers: gptmr: update sample output.
26+
- samples: lwip: common: arch: ethernetif: update a calling function name
27+
- samples:drivers: adc: optimize oneshot handler
28+
29+
### Added:
30+
- arch: add FPU related APIs
31+
- soc/board: add HPM6280 support
32+
- soc: HPM6750: acmp: add ACMP section
33+
- components: add mt9m114 support
34+
- drivers: add raw8 pixel format support
35+
- drivers: csr - Implement CSR driver
36+
- drivers: adc: adc16: support resolution setting
37+
- drivers/samples: add SDM/PLA/CRC/MCAN
38+
- drivers: I2C: add new API
39+
- drivers: adc: adc16: support resolution setting
40+
- drivers: enet: add enet control config for transmission
41+
- middleware: cherryusb: audio: update class driver and demo template
42+
- middleware: add mbedtls lib files with SDP acceleration
43+
- freeRTOS: add support for static allocation
44+
- samples: drivers: enet: add a pps demo
45+
- samples: cherryusb: add audio samples
46+
- samples: add the resolution parameter in all demos with ADC16
47+
- samples: add rfft demo
48+
- sampels: i2c: add interrupt b2b samples
49+
- samples: drivers: i2s: add an i2s_master demo
50+
- samples: drivers: i2s: add an i2s_slave demo
51+
- samples : rom_api : add sw_gm_api filter
52+
- samples: add the resolution parameter in all demos with ADC16
53+
54+
### Fixed:
55+
- openocd: hpm6300evk: update sdram initialization.
56+
- drivers: trgmux: trigmux edge filter setting error
57+
- drivers: enet: fix register access error
58+
- drivers: adc16: fix the config error of ADC16_CONFIG1
59+
- drivers: i2c: fix i2c timing configuration
60+
- drivers: SPI: fix SPI status API
61+
- drivers: fix gptmr cmp value don't minus one
62+
- drivers: mcan: correct the mcan ext_id filter issue
63+
- drivers: I2C: fix issue in i2c_master_address_read API
64+
- drivers: Self_ACK cannot be set in CAN driver
65+
- drivers: rtc rtc_config_alarm always return error code
66+
- cmake: correct source code compilation
67+
- soc: toolchain: gcc: initialize heap for SES
68+
- soc: gcc linker files: add NOLOAD keyword to noncacheable.bss section
69+
- soc: HPM6360: gcc: ld: correct noncacheable region name.
70+
- drivers: qei: Fix speed display always zero
71+
- middleware: freertos: disable global irq before vTaskStartScheduler
72+
- freeRTOS: fix trap when enable float feature
73+
- freeRTOS: fix tick lost
74+
- freeRTOS: fix segger project build warning
75+
- samples: drivers: i2s: fix CFGR config
76+
- samples: drivers: fix acmp toggle error
77+
- samples: lwip: fix the DHCP issue
78+
- samples: uart: fix irq_id judgment
79+
- samples: fix the order of uart pin configuration and clock configuration
80+
- samples: update spi dma sample
81+
- samples: drivers: sysctl: correct reset enable approach.
82+
- samples: fix dma_general_transfer sample memory out of bounds
83+
- samples: drivers: wdog: Fix logic issue on finding the nearest interrupt interval
84+
- sample: audio_codec: decoder_wav: add '\0' to fatfs path
85+
386
## [1.00.0] - 2022-12-31:
487

588
Main changes since 0.14.0

CMakeLists.txt

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.20)
77
endif()
88
cmake_policy(SET CMP0079 NEW)
99

10-
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
11-
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
10+
if(flash_size)
11+
sdk_linker_global_symbols("_flash_size=${flash_size}")
12+
endif()
13+
14+
if(extram_size)
15+
sdk_linker_global_symbols("_extram_size=${extram_size}")
16+
endif()
1217

13-
sdk_linker_global_symbols("_flash_size=${flash_size}")
14-
sdk_linker_global_symbols("_extram_size=${extram_size}")
1518
sdk_linker_global_symbols("_heap_size=${HEAP_SIZE}")
1619
sdk_linker_global_symbols("_stack_size=${STACK_SIZE}")
1720

@@ -108,7 +111,7 @@ endif()
108111

109112
if(DEFINED CUSTOM_SES_STARTUP_FILE)
110113
set(USE_CUSTOM_STARTUP 1)
111-
sdk_gcc_src(${CUSTOM_SES_STARTUP_FILE})
114+
sdk_ses_src(${CUSTOM_SES_STARTUP_FILE})
112115
endif()
113116

114117
sdk_sys_inc(${SYSROOT_DIR}/include)
@@ -151,44 +154,49 @@ endif()
151154

152155
sdk_ld_options("-T ${LINKER_SCRIPT}")
153156

157+
set(generated_file_path "${PROJECT_BINARY_DIR}/generated")
154158
# prepare dummy file
155-
set(EMPTY_FILE ${PROJECT_BINARY_DIR}/misc/empty.c)
159+
set(EMPTY_FILE ${generated_file_path}/misc/empty.c)
156160
file(WRITE ${EMPTY_FILE} "")
157161

158162
add_executable(${APP_ELF_NAME} ${EMPTY_FILE})
159163

160164
# generate SDK version file
161165
execute_process(
162166
COMMAND ${CMAKE_COMMAND} -DHPM_SDK_BASE=${HPM_SDK_BASE}
163-
-DOUT_FILE=${PROJECT_BINARY_DIR}/include/generated/hpm_sdk_version.h
167+
-DOUT_FILE=${generated_file_path}/include/hpm_sdk_version.h
164168
-P ${HPM_SDK_BASE}/cmake/gen_version_h.cmake
165169
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
166170
)
167-
sdk_inc(${PROJECT_BINARY_DIR}/include/generated/)
171+
sdk_inc(${generated_file_path}/include)
168172

169173
set_target_properties(${APP_ELF_NAME} PROPERTIES LINK_DEPENDS ${LINKER_SCRIPT})
170174

171175
if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
172176
target_link_libraries(${APP_ELF_NAME}
173-
"-Wl,-Map=${PROJECT_BINARY_DIR}/${APP_MAP_NAME}"
177+
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
178+
"-Wl,--whole-archive"
174179
${HPM_SDK_NDSGCC_LIB_ITF}
175180
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
176-
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app)
181+
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
182+
"-Wl,--no-whole-archive")
177183
else()
178184
target_link_libraries(${APP_ELF_NAME}
179-
"-Wl,-Map=${PROJECT_BINARY_DIR}/${APP_MAP_NAME}"
180-
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
181-
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app)
185+
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
186+
"-Wl,--whole-archive"
187+
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
188+
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
189+
"-Wl,--no-whole-archive")
182190
endif()
183191

184192
add_custom_command(
185193
TARGET ${APP_ELF_NAME}
186-
COMMAND "${CROSS_COMPILE}objcopy" -O binary -S ${PROJECT_BINARY_DIR}/${APP_ELF_NAME} ${PROJECT_BINARY_DIR}/${APP_BIN_NAME}
194+
COMMAND "${CROSS_COMPILE}objcopy" -O binary -S ${EXECUTABLE_OUTPUT_PATH}/${APP_ELF_NAME} ${EXECUTABLE_OUTPUT_PATH}/${APP_BIN_NAME}
187195
)
188196

189197
add_custom_command(
190198
TARGET ${APP_ELF_NAME}
191-
COMMAND "${CROSS_COMPILE}objdump" -S -d ${PROJECT_BINARY_DIR}/${APP_ELF_NAME} > ${PROJECT_BINARY_DIR}/${APP_ASM_NAME}
199+
COMMAND "${CROSS_COMPILE}objdump" -S -d ${EXECUTABLE_OUTPUT_PATH}/${APP_ELF_NAME} > ${EXECUTABLE_OUTPUT_PATH}/${APP_ASM_NAME}
192200
)
193201

194202

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BSD 3-Clause "New" or "Revised" License
22
https://spdx.org/licenses/BSD-3-Clause.html
33

4-
Copyright (c) 2021-2022, HPMicro. All rights reserved.
4+
Copyright (c) 2021-2023, HPMicro. All rights reserved.
55

66
Redistribution and use in source and binary forms, with or without
77
modification, are permitted provided that the following conditions are met:

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
1+
``` mermaid
2+
gantt
3+
title HPM SDK Release Plan
4+
dateFormat YYYY-MM-DD
5+
section Mainline Release
6+
v1.1.0 :a1, 2023-01-01, 2023-03-31
7+
v1.2.0 :a2, 2023-04-01, 2023-06-30
8+
v1.3.0 :a3, 2023-07-01, 2023-09-30
9+
v1.4.0 :a4, 2023-10-01, 2023-12-31
10+
```
11+
12+
[中文](README_zh.md)
13+
114
# HPM SDK Overview
215
The HPM SDK Project is a software development kit based on HPMicro's MCUs, which supports a wide range of MCUs, based on the BSD license, including drivers, middleware and RTOS, such as littlevgl/ lwIP/ TinyUSB/ FreeRTOS, etc. It supports a large number of Boards.
316

4-
## SDK directory
17+
## SDK Directory Structure
518

619
| Name | Description |
720
|--------|--------|
821
| <HPM_SDK_BASE>/arch | cpu architecture |
922
| <HPM_SDK_BASE>/boards | board support files |
1023
| <HPM_SDK_BASE>/cmake | cmake extensions |
1124
| <HPM_SDK_BASE>/components | software components |
12-
| <HPM_SDK_BASE>/doc | documentation |
25+
| <HPM_SDK_BASE>/docs | documentation |
1326
| <HPM_SDK_BASE>/drivers | low level driver files |
1427
| <HPM_SDK_BASE>/middleware | middleware files |
1528
| <HPM_SDK_BASE>/samples | sample source for drivers, middleware, components |
1629
| <HPM_SDK_BASE>/scripts | util scripts |
1730
| <HPM_SDK_BASE>/soc | SoC specific source |
1831
| <HPM_SDK_BASE>/utils | util source |
1932

33+
## SDK Documentation
34+
- Local:
35+
SDK documentation can be built locally, once it's done, it can be accessed with the following entries:
36+
- <HPM_SDK_BASE>>/docs/index.html
37+
- <HPM_SDK_BASE>>/docs/index_zh.html
38+
> Please refer to <HPM_SDK_BASE>/docs/README.md for more details about documentation building.
39+
- Online:
40+
- http://hpm-sdk.readthedocs.io/
41+
- http://hpm-sdk-zh.readthedocs.io/
42+
2043
## HPM SDK Quick Start Guide
2144

2245
### Minimum required version of dependencies are:

README_zh.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,45 @@
1+
``` mermaid
2+
gantt
3+
title HPM SDK Release Plan
4+
dateFormat YYYY-MM-DD
5+
section Mainline Release
6+
v1.1.0 :a1, 2023-01-01, 2023-03-31
7+
v1.2.0 :a2, 2023-04-01, 2023-06-30
8+
v1.3.0 :a3, 2023-07-01, 2023-09-30
9+
v1.4.0 :a4, 2023-10-01, 2023-12-31
10+
```
11+
12+
[English](README.md)
13+
114
# HPM SDK 概述
215
HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多种MCU。基于BSD许可证,包含了底层驱动,中间件和RTOS,例如littlevgl/ lwIP/ TinyUSB/ FreeRTOS等,支持大量评估板。
316

4-
## HPM SDK directory
17+
## HPM SDK 目录结构
518

619
| 目录名称 | 描述 |
720
|--------|--------|
821
| <HPM_SDK_BASE>/arch | cpu架构相关文件 |
922
| <HPM_SDK_BASE>/boards | 板级文件 |
1023
| <HPM_SDK_BASE>/cmake | cmake扩展 |
1124
| <HPM_SDK_BASE>/components | 软件组件 |
12-
| <HPM_SDK_BASE>/doc | 文档 |
25+
| <HPM_SDK_BASE>/docs | 文档 |
1326
| <HPM_SDK_BASE>/drivers | 底层驱动文件|
1427
| <HPM_SDK_BASE>/middleware | 中间件 |
1528
| <HPM_SDK_BASE>/samples | 驱动、中间件以及软件组件示例代码 |
1629
| <HPM_SDK_BASE>/scripts | 辅助脚本 |
1730
| <HPM_SDK_BASE>/soc | SoC相关文件 |
1831
| <HPM_SDK_BASE>/utils | 辅助文件 |
1932

33+
## SDK文档
34+
- 本地文档:
35+
SDK文档可以进行本地编译,成功编译之后可以通过以下入口访问本地文档:
36+
- <HPM_SDK_BASE>>/docs/index.html
37+
- <HPM_SDK_BASE>>/docs/index_zh.html
38+
> 文档编译方式请参考<HPM_SDK_BASE>/docs/README.md
39+
- 在线文档:
40+
- http://hpm-sdk.readthedocs.io/
41+
- http://hpm-sdk-zh.readthedocs.io/
42+
2043
## HPM SDK使用说明
2144

2245
### 依赖软件最低版本要求
@@ -274,4 +297,4 @@ HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多
274297
## 社区支持
275298
- github page: https://hpmicro.github.io
276299
- github: https://github.com/hpmicro/hpm_sdk
277-
- gitee: https://gitee.com/hpmicro/hpm_sdk
300+
- gitee: https://gitee.com/hpmicro/hpm_sdk

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
VERSION_MAJOR = 1
2-
VERSION_MINOR = 0
2+
VERSION_MINOR = 1
33
PATCHLEVEL = 0
44
VERSION_TWEAK = 0
55
EXTRAVERSION = 0

arch/riscv/riscv_core.h

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,17 @@ extern "C" {
3737
*
3838
* @return csr value before cleared
3939
*/
40-
#define read_clear_csr(csr_num, bit) ({ uint32_t v; __asm volatile("csrrc %0, %1, %2" : "=r"(v) : "i"(csr_num), "r"(bit)); v; })
40+
#define read_clear_csr(csr_num, bit) ({ volatile uint32_t v = 0; __asm volatile("csrrc %0, %1, %2" : "=r"(v) : "i"(csr_num), "r"(bit)); v; })
41+
42+
/**
43+
* @brief read and set bits in csr
44+
*
45+
* @param csr_num specific csr
46+
* @param bit bits to be set
47+
*
48+
* @return csr value before set
49+
*/
50+
#define read_set_csr(csr_num, bit) ({ volatile uint32_t v = 0; __asm volatile("csrrs %0, %1, %2" : "=r"(v) : "i"(csr_num), "r"(bit)); v; })
4151

4252
/**
4353
* @brief set bits in csr
@@ -77,6 +87,21 @@ extern "C" {
7787
*/
7888
#define fencei() __asm volatile("fence.i")
7989

90+
/**
91+
* @brief enable fpu
92+
*/
93+
#define enable_fpu() read_set_csr(CSR_MSTATUS, CSR_MSTATUS_FS_MASK)
94+
95+
/**
96+
* @brief disable fpu
97+
*/
98+
#define disable_fpu() read_clear_csr(CSR_MSTATUS, CSR_MSTATUS_FS_MASK)
99+
100+
/**
101+
* @brief clear fcsr
102+
*/
103+
#define clear_fcsr() write_fcsr(0)
104+
80105
#ifdef __cplusplus
81106
}
82107
#endif

boards/hpm6200evk/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright 2022 hpmicro
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
sdk_compile_definitions_ifdef(BUILD_FOR_SECONDARY_CORE BOARD_RUNNING_CORE=HPM_CORE1)
5+
6+
sdk_inc(.)
7+
sdk_src(pinmux.c)
8+
sdk_src(board.c)

0 commit comments

Comments
 (0)