Skip to content

Commit

Permalink
NUVOTON: Support upload methods
Browse files Browse the repository at this point in the history
Support targets include:
- NUMAKER_PFM_NANO130
- NUMAKER_PFM_NUC472
- NUMAKER_PFM_M453
- NUMAKER_PFM_M487
- NUMAKER_IOT_M487
- NUMAKER_IOT_M467
- NUMAKER_IOT_M252
- NUMAKER_IOT_M263A
- NU_M2354
  • Loading branch information
ccli8 committed Aug 26, 2024
1 parent de273ee commit 8ec06b3
Show file tree
Hide file tree
Showing 12 changed files with 219 additions and 0 deletions.
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NUMAKER_IOT_M252.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NUMAKER_IOT_M252.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m252kg6ae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m23.cfg)
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NUMAKER_IOT_M263A.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NUMAKER_IOT_M263A.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m263kiaae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m23.cfg)
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NUMAKER_IOT_M467.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NUMAKER_IOT_M467.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m467hjhae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m4.cfg)
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NUMAKER_IOT_M487.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NUMAKER_IOT_M487.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m487jidae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m4.cfg)
18 changes: 18 additions & 0 deletions targets/upload_method_cfg/NUMAKER_PFM_M453.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Mbed OS upload method configuration file for target NUMAKER_PFM_M453.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m4.cfg)
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NUMAKER_PFM_M487.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NUMAKER_PFM_M487.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m487jidae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m4.cfg)
18 changes: 18 additions & 0 deletions targets/upload_method_cfg/NUMAKER_PFM_NANO130.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Mbed OS upload method configuration file for target NUMAKER_PFM_NANO130.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m0.cfg)
18 changes: 18 additions & 0 deletions targets/upload_method_cfg/NUMAKER_PFM_NUC472.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Mbed OS upload method configuration file for target NUMAKER_PFM_NUC472.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m4.cfg)
24 changes: 24 additions & 0 deletions targets/upload_method_cfg/NU_M2354.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Mbed OS upload method configuration file for target NU_M2354.
# To change any of these parameters from their default values, set them in your build script between where you
# include app.cmake and where you add mbed os as a subdirectory.

# General config parameters
# -------------------------------------------------------------
set(UPLOAD_METHOD_DEFAULT MBED)

# Config options for MBED
# -------------------------------------------------------------
set(MBED_UPLOAD_ENABLED TRUE)
set(MBED_RESET_BAUDRATE 115200)

# Config options for PYOCD
# -------------------------------------------------------------
set(PYOCD_UPLOAD_ENABLED TRUE)
set(PYOCD_TARGET_NAME m2354kjfae)
set(PYOCD_CLOCK_SPEED 4000k)

# Config options for OPENOCD
# -------------------------------------------------------------
set(OPENOCD_UPLOAD_ENABLED TRUE)
set(OPENOCD_CHIP_CONFIG_COMMANDS
-f ${CMAKE_CURRENT_LIST_DIR}/openocd_cfgs/numicro_m23.cfg)
4 changes: 4 additions & 0 deletions targets/upload_method_cfg/openocd_cfgs/numicro_m0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OpenOCD config file for Nuvoton NuMicro M0 series

source [find interface/nulink.cfg]
source [find target/numicroM0.cfg]
13 changes: 13 additions & 0 deletions targets/upload_method_cfg/openocd_cfgs/numicro_m23.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# OpenOCD config file for Nuvoton NuMicro M4 series

# Meet the following warning and flash programming gets to take too long
# to finish. Fix it by enlarging work area size. This fix will also get into
# numicroM23.cfg in upcoming NuEclipse OpenOCD release.
#
# Warn : not enough working area available(requested 4096)
# Warn : No large enough working area available, can't do block memory writes
# Warn : couldn't use block writes, falling back to single memory accesses
set WORKAREASIZE 0x8000

source [find interface/nulink.cfg]
source [find target/numicroM23.cfg]
4 changes: 4 additions & 0 deletions targets/upload_method_cfg/openocd_cfgs/numicro_m4.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# OpenOCD config file for Nuvoton NuMicro M4 series

source [find interface/nulink.cfg]
source [find target/numicroM4.cfg]

0 comments on commit 8ec06b3

Please sign in to comment.