Skip to content

Commit

Permalink
hpm sdk release v1.2.0
Browse files Browse the repository at this point in the history
Main changes since 1.1.0

Tested Segger Embedded Studio Version: 7.22

- Changed:
  - boards: hpm6750evk*: decrease core frequency from 816MHz to 648MHz
  - openocd: soc: hpm6280: simplify dual core release core1 approach.
  - cmake: segger: configure optimization level according to gcc level.
  - soc: dmamux: move it from ip to soc
  - soc: interrupt: adjust irq api. #659
  - soc: improve svd file
  - soc: hpm_soc_feature.h: remove ADC16_SOC_TEMP_CH_EN for some specified Socs
  - components: enet_phy: update the common enet phy header file
  - components: sgtl5000 and wm8960: update clock setting
  - drivers: uart: update uart driver
  - drivers: pdma: improve quality of scale
  - drivers: adc: adjust wait_dis type in adc16_config_t struct
  - drivers: enet: update rmii reference clock setting API for ENET
  - utils: hpm_swap: escape for andes toolchain.
  - middleware: hpm_sdmmc: add spi sdcard
  - middleware: motor_ctrl: change the file organization
  - middleware: motor_ctrl: remove slide control content from foc
  - middleware: lvgl: upgrade to v8.3.5 (with pdma)
  - middleware: lvgl: Add direct mode
  - middleware: cherryusb: update version to v0.8.0
  - samples: I2S_DMA and I2S Interrupt: update sample behavior
  - samples: cherryusb: hid host: separate mouse and keyboard urb
  - samples: cherryusb: increase max interface and endpoint number Configuration
  - samples: cherryusb: uac2: move setting sampling freq to isr
  - samples: cherryusb: audio: update descriptor for identification
  - samples: audio_codec: set codec voice to max and increase irq priority
  - samples: multicore: lvgl_coremark: delete custom linker files and using andes toolchain
  - samples: lvgl_audio_player: update CMakeLists.txt to using noncacheable framebuffer
  - samples: spi: clean the redundant code
  - samples: i2c: improve the processing of FIFO in ISR
  - samples: drivers: uart: update uart_rx_timeout demo
  - samples: drivers: gptmr: split sample into multiple function samples
  - samples: drivers: adc: optimization for all macro definitions in applications
  - samples: drivers: adc: update struct member names
  - samples: update clock divider setting for ADC-related examples
  - samples: cherryusb: move vid/pid etc definition to usb_config.h
  - samples: cherryusb: device: update vid to hpmicro 0x34B7
  - samples: cherryusb: change API update for v0.8
  - samples: cherryusb: device: audiov1: change to full speed mode
  - samples: tinyusb: uac2: update descriptor and sample
  - samples: lwip: disable mmc interrupt settings
  - samples: lwip: lwip_ptp: v1: sync precision improvement

- Added:
  - cmake: toolchains: add isa spec 20191213 support.
  - cmake: ses: support set ses raw option in CMakeLists.txt
  - cmake: add option to specify board search path.
  - cmake: generate compile_commands.json file
  - soc: hpm_soc_feature: add a common macro for ADC12 and ADC16
  - drivers: cam: add new APIs
  - drivers: spi: add new APIs
  - drivers: i2c: add new APIs
  - drivers: I2S: add i2s_check_data_line_status API
  - drivers: dma: add dma_set_transfer_src_width_byte_size() API
  - drivers: gptmr: add output capture APIs
  - drivers: gptmr: add gptmr_channel_get_dma_request_event api
  - drivers: adc: add adc16_trigger_pmt_by_sw API
  - drivers: enet: add some APIs related to interrupt settings
  - drivers: enet: add a new API for transmisstion
  - drivers: usb: add macro CONFIG_USB_DEVICE_FS to set full speed mode
  - components: uart_lin: add uart lin component
  - components: add smbus
  - components: add sccb
  - middleware: lvgl: add macro HPM_LVGL_FRAMEBUFFER_NONCACHEABLE
  - middleware: add AzureRTOS (threadx/usbx/netx/guix)
  - middleware: hpm_mcl: sensorless over-zero
  - middleware: add smc
  - middleware: hpm_sdmmc Add eMMC support
  - middleware: hpm_math: add bit conversion function
  - middleware: add uC/OS-III
  - middleware: cherryusb: audio: add feedback descriptor
  - middleware: cherryusb: audio: add param to set endpoint bmAttributes
  - middleware: microros: add microros foxy sources
  - samples: drivers: spi: add spi_sdcard_fatfs sample
  - samples: drivers: spi: add sd sample
  - samples: add uart_lin
  - samples: motor_ctrl: sensorless: over-zero demo
  - samples: cherryusb: add rndis host dhcp samples
  - samples: drivers: sdxc :emmc Added eMMC sample
  - samples: drivers: adc12: update irq pattern for sequence usage
  - samples: drivers: pla: add pla tamagawa demo
  - samples: drivers: gptmr: add counter_sync sample
  - samples: drivers: gptmr: add timer_basic sample
  - samples: drivers: gptmr: add t_shape_accel_decel sample
  - samples: drivers: dma/gptmr: add trigger dma transfer using gptmr event sample
  - samples: drivers: uart add uart_rx_timeout sample
  - samples: i2c: add smbus samples
  - samples: lwip: lwip_tcpecho_freertos: add self-adaption
  - samples: cherryusb: hid host: move usbh_submit_urb() out of condition
  - samples: cherryusb: add composite freertos sample
  - samples: cherryusb: add rndis freertos sample
  - samples: cherryusb: add msc freertos sample
  - samples: cherryusb: add audio v2 mic speaker freertos sample
  - samples: cherryusb: add hid mouse freertos sample
  - samples: cherryusb: add hid keyboard freertos sample
  - samples: cherryusb: add cdc acm freertos sample
  - samples: cherryusb: add rndis tcp server sample
  - samples: cherryusb: add rndis device udp_echo sample
  - samples: cherryusb: add rndis device http_server sample
  - samples: cherryusb: device: add audio_v2_speaker_sync sample
  - samples: add several uC/OS-III samples
  - samples: smc: add smc demo
  - samples: microros: add subscriber, sevice and publisher
  - samples: uC/OS-III: mutex

- Fixed:
  - cmake: ses: fix __SEGGER_RTL_vfprintf issue with nds tool in SES 7.20.
  - soc: hpm6280: Modify the number of PWM cmps.
  - soc: reset.c: __dso_handle needs to be declared for nds toolchain.
  - soc: fix max buffer length in sequence mode for ADC
  - soc: HPM6750: enet soc drv: fix set clock delay settings
  - soc:hpm6360:sdxc Correct clock divider settting issue
  - drivers: pla: missing Union Field
  - drivers: spi: fix the problem of CMD and ADDR configuration order
  - drivers: i2c: fix clock frequency error rate problem
  - drivers: i2c: clear CMPL bit in API to avoid blocking the trans
  - drivers: i2c: fix i2c slave device read and write fail
  - drivers: i2c: fix read data unexpected multi transition.
  - drivers: i2c: fix w1c clear status error
  - driver: usb: fix w1c clear flag error
  - drivers: gptmr: fix dma request enum definition
  - drivers: adc: fix logics for judging the validity of arguments
  - component: uart_lin: fix break signal problem
  - middleware: cherryusb: fix buffer size error
  - middleware: lvgl: fix fbbuffer option
  - samples: gptmr: fix pwm_measure sample compile waring
  - samples: jpeg: fix interchange format of exif support
  - samples: jpeg: fix jpeg decode
  - samples: drivers: spi: fix the problem of CMD and ADDR configuration order
  - samples: drivers: mcan: can_fd loopback test setting is incorrect
  - samples: cherryusb: http_server_freertos: fix printf content error
  - samples: cherryusb: audio: change endpoint attributes for support MACBOOK
  - samples: tinyusb: msc: increase block numbers for windows format
  - samples: lwip: lwip_httpsrv: fix reload or refresh error

Signed-off-by: Ryan QIAN <jianghao.qian@hpmicro.com>
  • Loading branch information
jhqian committed Jun 30, 2023
1 parent 0d007e1 commit 2d5e67a
Show file tree
Hide file tree
Showing 7,536 changed files with 1,666,569 additions and 374,790 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
142 changes: 142 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,147 @@
# Change Log

## [1.2.0] - 2023-06-30:

Main changes since 1.1.0

Tested Segger Embedded Studio Version: 7.22

### Changed:
- boards: hpm6750evk*: decrease core frequency from 816MHz to 648MHz
- openocd: soc: hpm6280: simplify dual core release core1 approach.
- cmake: segger: configure optimization level according to gcc level.
- soc: dmamux: move it from ip to soc
- soc: interrupt: adjust irq api. #659
- soc: improve svd file
- soc: hpm_soc_feature.h: remove ADC16_SOC_TEMP_CH_EN for some specified Socs
- components: enet_phy: update the common enet phy header file
- components: sgtl5000 and wm8960: update clock setting
- drivers: uart: update uart driver
- drivers: pdma: improve quality of scale
- drivers: adc: adjust wait_dis type in adc16_config_t struct
- drivers: enet: update rmii reference clock setting API for ENET
- utils: hpm_swap: escape for andes toolchain.
- middleware: hpm_sdmmc: add spi sdcard
- middleware: motor_ctrl: change the file organization
- middleware: motor_ctrl: remove slide control content from foc
- middleware: lvgl: upgrade to v8.3.5 (with pdma)
- middleware: lvgl: Add direct mode
- middleware: cherryusb: update version to v0.8.0
- samples: I2S_DMA and I2S Interrupt: update sample behavior
- samples: cherryusb: hid host: separate mouse and keyboard urb
- samples: cherryusb: increase max interface and endpoint number Configuration
- samples: cherryusb: uac2: move setting sampling freq to isr
- samples: cherryusb: audio: update descriptor for identification
- samples: audio_codec: set codec voice to max and increase irq priority
- samples: multicore: lvgl_coremark: delete custom linker files and using andes toolchain
- samples: lvgl_audio_player: update CMakeLists.txt to using noncacheable framebuffer
- samples: spi: clean the redundant code
- samples: i2c: improve the processing of FIFO in ISR
- samples: drivers: uart: update uart_rx_timeout demo
- samples: drivers: gptmr: split sample into multiple function samples
- samples: drivers: adc: optimization for all macro definitions in applications
- samples: drivers: adc: update struct member names
- samples: update clock divider setting for ADC-related examples
- samples: cherryusb: move vid/pid etc definition to usb_config.h
- samples: cherryusb: device: update vid to hpmicro 0x34B7
- samples: cherryusb: change API update for v0.8
- samples: cherryusb: device: audiov1: change to full speed mode
- samples: tinyusb: uac2: update descriptor and sample
- samples: lwip: disable mmc interrupt settings
- samples: lwip: lwip_ptp: v1: sync precision improvement

### Added:
- cmake: toolchains: add isa spec 20191213 support.
- cmake: ses: support set ses raw option in CMakeLists.txt
- cmake: add option to specify board search path.
- cmake: generate compile_commands.json file
- soc: hpm_soc_feature: add a common macro for ADC12 and ADC16
- drivers: cam: add new APIs
- drivers: spi: add new APIs
- drivers: i2c: add new APIs
- drivers: I2S: add i2s_check_data_line_status API
- drivers: dma: add dma_set_transfer_src_width_byte_size() API
- drivers: gptmr: add output capture APIs
- drivers: gptmr: add gptmr_channel_get_dma_request_event api
- drivers: adc: add adc16_trigger_pmt_by_sw API
- drivers: enet: add some APIs related to interrupt settings
- drivers: enet: add a new API for transmisstion
- drivers: usb: add macro CONFIG_USB_DEVICE_FS to set full speed mode
- components: uart_lin: add uart lin component
- components: add smbus
- components: add sccb
- middleware: lvgl: add macro HPM_LVGL_FRAMEBUFFER_NONCACHEABLE
- middleware: add AzureRTOS (threadx/usbx/netx/guix)
- middleware: hpm_mcl: sensorless over-zero
- middleware: add smc
- middleware: hpm_sdmmc Add eMMC support
- middleware: hpm_math: add bit conversion function
- middleware: add uC/OS-III
- middleware: cherryusb: audio: add feedback descriptor
- middleware: cherryusb: audio: add param to set endpoint bmAttributes
- middleware: microros: add microros foxy sources
- samples: drivers: spi: add spi_sdcard_fatfs sample
- samples: drivers: spi: add sd sample
- samples: add uart_lin
- samples: motor_ctrl: sensorless: over-zero demo
- samples: cherryusb: add rndis host dhcp samples
- samples: drivers: sdxc :emmc Added eMMC sample
- samples: drivers: adc12: update irq pattern for sequence usage
- samples: drivers: pla: add pla tamagawa demo
- samples: drivers: gptmr: add counter_sync sample
- samples: drivers: gptmr: add timer_basic sample
- samples: drivers: gptmr: add t_shape_accel_decel sample
- samples: drivers: dma/gptmr: add trigger dma transfer using gptmr event sample
- samples: drivers: uart add uart_rx_timeout sample
- samples: i2c: add smbus samples
- samples: lwip: lwip_tcpecho_freertos: add self-adaption
- samples: cherryusb: hid host: move usbh_submit_urb() out of condition
- samples: cherryusb: add composite freertos sample
- samples: cherryusb: add rndis freertos sample
- samples: cherryusb: add msc freertos sample
- samples: cherryusb: add audio v2 mic speaker freertos sample
- samples: cherryusb: add hid mouse freertos sample
- samples: cherryusb: add hid keyboard freertos sample
- samples: cherryusb: add cdc acm freertos sample
- samples: cherryusb: add rndis tcp server sample
- samples: cherryusb: add rndis device udp_echo sample
- samples: cherryusb: add rndis device http_server sample
- samples: cherryusb: device: add audio_v2_speaker_sync sample
- samples: add several uC/OS-III samples
- samples: smc: add smc demo
- samples: microros: add subscriber, sevice and publisher
- samples: uC/OS-III: mutex

### Fixed:
- cmake: ses: fix __SEGGER_RTL_vfprintf issue with nds tool in SES 7.20.
- soc: hpm6280: Modify the number of PWM cmps.
- soc: reset.c: __dso_handle needs to be declared for nds toolchain.
- soc: fix max buffer length in sequence mode for ADC
- soc: HPM6750: enet soc drv: fix set clock delay settings
- soc:hpm6360:sdxc Correct clock divider settting issue
- drivers: pla: missing Union Field
- drivers: spi: fix the problem of CMD and ADDR configuration order
- drivers: i2c: fix clock frequency error rate problem
- drivers: i2c: clear CMPL bit in API to avoid blocking the trans
- drivers: i2c: fix i2c slave device read and write fail
- drivers: i2c: fix read data unexpected multi transition.
- drivers: i2c: fix w1c clear status error
- driver: usb: fix w1c clear flag error
- drivers: gptmr: fix dma request enum definition
- drivers: adc: fix logics for judging the validity of arguments
- component: uart_lin: fix break signal problem
- middleware: cherryusb: fix buffer size error
- middleware: lvgl: fix fbbuffer option
- samples: gptmr: fix pwm_measure sample compile waring
- samples: jpeg: fix interchange format of exif support
- samples: jpeg: fix jpeg decode
- samples: drivers: spi: fix the problem of CMD and ADDR configuration order
- samples: drivers: mcan: can_fd loopback test setting is incorrect
- samples: cherryusb: http_server_freertos: fix printf content error
- samples: cherryusb: audio: change endpoint attributes for support MACBOOK
- samples: tinyusb: msc: increase block numbers for windows format
- samples: lwip: lwip_httpsrv: fix reload or refresh error

## [1.1.0] - 2023-03-31:

Main changes since 1.0.0
Expand Down
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,27 @@ sdk_inc(${generated_file_path}/include)

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

if(NOT DEFINED HPM_SDK_LD_NO_WHOLE_SDK)
set(HPM_SDK_LD_NO_WHOLE_SDK 0)
endif()

set(HPM_SDK_WHOLE_ARCHIVE_OPT "-Wl,--whole-archive")
if(${HPM_SDK_LD_NO_WHOLE_SDK})
set(HPM_SDK_WHOLE_ARCHIVE_OPT "")
endif()

if("${TOOLCHAIN_VARIANT}" STREQUAL "nds-gcc")
target_link_libraries(${APP_ELF_NAME}
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
"-Wl,--whole-archive"
${HPM_SDK_WHOLE_ARCHIVE_OPT}
${HPM_SDK_NDSGCC_LIB_ITF}
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
"-Wl,--no-whole-archive")
else()
target_link_libraries(${APP_ELF_NAME}
"-Wl,-Map=${EXECUTABLE_OUTPUT_PATH}/${APP_MAP_NAME}"
"-Wl,--whole-archive"
${HPM_SDK_WHOLE_ARCHIVE_OPT}
${HPM_SDK_GCC_LIB} ${HPM_SDK_GCC_LIB_ITF}
${HPM_SDK_LIB} ${HPM_SDK_LIB_ITF} app
"-Wl,--no-whole-archive")
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,15 @@ The HPM SDK Project is a software development kit based on HPMicro's MCUs, which

Open zadig, click Options-> List All Devices.

![List All Devices](doc/images/readme/zadig_list_all_devices.png)
![List All Devices](docs/assets/zadig_list_all_devices.png)

Select Dual RS232-HS (Interface 0).

![Select Dual RS232-HS (Interface 0)](doc/images/readme/zadig_select_dual_rs232-hs.png)
![Select Dual RS232-HS (Interface 0)](docs/assets/zadig_select_dual_rs232-hs.png)

Then click Install Driver or Replace Driver.

![Replace Driver](doc/images/readme/zadig_replace_driver.png)
![Replace Driver](docs/assets/zadig_replace_driver.png)

7. Go to hello_world directory

Expand All @@ -270,7 +270,7 @@ The HPM SDK Project is a software development kit based on HPMicro's MCUs, which
9. connect gdb client to the gdbserver started by openocd, (by default, gdbserver port is 3333)

```GDB
gdb> file build/output/hello_world.elf
gdb> file build/output/demo.elf
gdb> target remote localhost:3333
gdb> load
gdb> b main
Expand Down
8 changes: 4 additions & 4 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,15 @@ HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多

打开zadig,点击 Options->List All Devices.

![List All Devices](doc/images/readme/zadig_list_all_devices.png)
![List All Devices](docs/assets/zadig_list_all_devices.png)

选择 Dual RS232-HS (Interface 0).

![Select Dual RS232-HS (Interface 0)](doc/images/readme/zadig_select_dual_rs232-hs.png)
![Select Dual RS232-HS (Interface 0)](docs/assets/zadig_select_dual_rs232-hs.png)

然后点击 Install Driver 或 Replace Driver.

![Replace Driver](doc/images/readme/zadig_replace_driver.png)
![Replace Driver](docs/assets/zadig_replace_driver.png)

7. 切换到hello_world目录

Expand All @@ -279,7 +279,7 @@ HPM SDK项目是基于HPMicro 公司的MCU编写的软件开发包,支持多
9. 连接GDB client到openocd GDB server (缺省状态下, openocd gdbserver 端口为 3333)

```GDB
gdb> file build/output/hello_world.elf
gdb> file build/output/demo.elf
gdb> target remote localhost:3333
gdb> load
gdb> b main
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_MAJOR = 1
VERSION_MINOR = 1
VERSION_MINOR = 2
PATCHLEVEL = 0
VERSION_TWEAK = 0
EXTRAVERSION = 0
6 changes: 5 additions & 1 deletion boards/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Copyright (c) 2021 HPMicro
# SPDX-License-Identifier: BSD-3-Clause

add_subdirectory(${HPM_BOARD_DIR})
if(BOARD_SEARCH_DIR)
add_subdirectory(${BOARD_SEARCH_DIR} ${BOARD})
else()
add_subdirectory(${HPM_BOARD_DIR})
endif()
2 changes: 1 addition & 1 deletion boards/hpm6200evk/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 hpmicro
# Copyright (c) 2022 HPMicro
# SPDX-License-Identifier: BSD-3-Clause

sdk_compile_definitions_ifdef(BUILD_FOR_SECONDARY_CORE BOARD_RUNNING_CORE=HPM_CORE1)
Expand Down
29 changes: 8 additions & 21 deletions boards/hpm6200evk/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "hpm_gpio_drv.h"
#include "pinmux.h"
#include "hpm_pmp_drv.h"
#include "assert.h"
#include "hpm_clock_drv.h"
#include "hpm_sysctl_drv.h"
#include "hpm_pwm_drv.h"
Expand All @@ -22,7 +21,6 @@
#include "hpm_pcfg_drv.h"

static board_timer_cb timer_cb;
ATTR_PLACE_AT_NONCACHEABLE_BSS static bool init_delay_flag;

/**
* @brief FLASH configuration option definitions:
Expand Down Expand Up @@ -189,29 +187,12 @@ void board_init(void)

void board_delay_us(uint32_t us)
{
static uint32_t gptmr_freq;
gptmr_channel_config_t config;

if (init_delay_flag == false) {
init_delay_flag = true;
clock_add_to_group(BOARD_DELAY_TIMER_CLK_NAME, 0);
gptmr_freq = clock_get_frequency(BOARD_DELAY_TIMER_CLK_NAME);
gptmr_channel_get_default_config(BOARD_DELAY_TIMER, &config);
gptmr_channel_config(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH, &config, false);
}

gptmr_channel_config_update_reload(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH, gptmr_freq / 1000000 * us);
gptmr_start_counter(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH);
while (!gptmr_check_status(BOARD_DELAY_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_DELAY_TIMER_CH))) {
__asm("nop");
}
gptmr_stop_counter(BOARD_DELAY_TIMER, BOARD_DELAY_TIMER_CH);
gptmr_clear_status(BOARD_DELAY_TIMER, GPTMR_CH_RLD_STAT_MASK(BOARD_DELAY_TIMER_CH));
clock_cpu_delay_us(us);
}

void board_delay_ms(uint32_t ms)
{
board_delay_us(1000 * ms);
clock_cpu_delay_ms(ms);
}

void board_timer_isr(void)
Expand Down Expand Up @@ -259,6 +240,12 @@ uint32_t board_init_spi_clock(SPI_Type *ptr)
clock_set_source_divider(clock_spi1, clk_src_pll0_clk0, 5U); /* 80MHz */

return clock_get_frequency(clock_spi1);
} else if (ptr == HPM_SPI2) {
/* SPI2 clock configure */
clock_add_to_group(clock_spi2, 0);
clock_set_source_divider(clock_spi2, clk_src_pll0_clk0, 5U); /* 80MHz */

return clock_get_frequency(clock_spi2);
} else if (ptr == HPM_SPI3) {
/* SPI3 clock configure */
clock_add_to_group(clock_spi3, 0);
Expand Down

0 comments on commit 2d5e67a

Please sign in to comment.