diff --git a/targets/TARGET_NUVOTON/README.md b/targets/TARGET_NUVOTON/README.md new file mode 100644 index 00000000000..3c24fc6001d --- /dev/null +++ b/targets/TARGET_NUVOTON/README.md @@ -0,0 +1,15 @@ +# Nuvoton NuMicro Cortex-M series + +## Nuvoton fork of OpenOCD + +Nuvoton NuMicro Cortex-M support for openocd is forked +[here](https://github.com/OpenNuvoton/OpenOCD-Nuvoton), +but has not yet upstreamed. +To enable openocd upload method for the series, +install [NuEclipse IDE](https://github.com/OpenNuvoton/Nuvoton_Tools) +which will also install the necessary openocd. + +> **ℹ️ Information** +> +> On Windows, openocd will usually install at: +`C:\Program Files (x86)\Nuvoton Tools\OpenOCD\bin\openocd.exe`. diff --git a/targets/upload_method_cfg/NUMAKER_IOT_M252.cmake b/targets/upload_method_cfg/NUMAKER_IOT_M252.cmake new file mode 100644 index 00000000000..75e33f5394d --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_IOT_M252.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_IOT_M263A.cmake b/targets/upload_method_cfg/NUMAKER_IOT_M263A.cmake new file mode 100644 index 00000000000..7b483f05ef0 --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_IOT_M263A.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_IOT_M467.cmake b/targets/upload_method_cfg/NUMAKER_IOT_M467.cmake new file mode 100644 index 00000000000..af769c889f4 --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_IOT_M467.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_IOT_M487.cmake b/targets/upload_method_cfg/NUMAKER_IOT_M487.cmake new file mode 100644 index 00000000000..e22ae6c968a --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_IOT_M487.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_PFM_M453.cmake b/targets/upload_method_cfg/NUMAKER_PFM_M453.cmake new file mode 100644 index 00000000000..fd6f99cb6ca --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_PFM_M453.cmake @@ -0,0 +1,22 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_PFM_M487.cmake b/targets/upload_method_cfg/NUMAKER_PFM_M487.cmake new file mode 100644 index 00000000000..c3ff2f11a8d --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_PFM_M487.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_PFM_NANO130.cmake b/targets/upload_method_cfg/NUMAKER_PFM_NANO130.cmake new file mode 100644 index 00000000000..9f32ef12033 --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_PFM_NANO130.cmake @@ -0,0 +1,22 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NUMAKER_PFM_NUC472.cmake b/targets/upload_method_cfg/NUMAKER_PFM_NUC472.cmake new file mode 100644 index 00000000000..b0fcaa85f7a --- /dev/null +++ b/targets/upload_method_cfg/NUMAKER_PFM_NUC472.cmake @@ -0,0 +1,22 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/NU_M2354.cmake b/targets/upload_method_cfg/NU_M2354.cmake new file mode 100644 index 00000000000..92b00d6af23 --- /dev/null +++ b/targets/upload_method_cfg/NU_M2354.cmake @@ -0,0 +1,28 @@ +# 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) + +# Nuvoton NuMicro Cortex-M support for OpenOCD is forked, but has +# not yet upstreamed. Its version number is fixed to 0.10.022. +set(OPENOCD_VERSION_RANGE 0.10.022...0.10.22) diff --git a/targets/upload_method_cfg/openocd_cfgs/numicro_m0.cfg b/targets/upload_method_cfg/openocd_cfgs/numicro_m0.cfg new file mode 100644 index 00000000000..fa2a33b299c --- /dev/null +++ b/targets/upload_method_cfg/openocd_cfgs/numicro_m0.cfg @@ -0,0 +1,4 @@ +# OpenOCD config file for Nuvoton NuMicro M0 series + +source [find interface/nulink.cfg] +source [find target/numicroM0.cfg] diff --git a/targets/upload_method_cfg/openocd_cfgs/numicro_m23.cfg b/targets/upload_method_cfg/openocd_cfgs/numicro_m23.cfg new file mode 100644 index 00000000000..968729067e3 --- /dev/null +++ b/targets/upload_method_cfg/openocd_cfgs/numicro_m23.cfg @@ -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] diff --git a/targets/upload_method_cfg/openocd_cfgs/numicro_m4.cfg b/targets/upload_method_cfg/openocd_cfgs/numicro_m4.cfg new file mode 100644 index 00000000000..6bbc7e61e28 --- /dev/null +++ b/targets/upload_method_cfg/openocd_cfgs/numicro_m4.cfg @@ -0,0 +1,4 @@ +# OpenOCD config file for Nuvoton NuMicro M4 series + +source [find interface/nulink.cfg] +source [find target/numicroM4.cfg]