C

Bootloader flashing instructions for Nuvoton boards

Connect the board to the host PC using an IAR I-jet debugger hardware and a 20-pin JTAG connector.

  1. Create an empty flash_bootloader.bat file and add the following contents to it:
    set QUL_ROOT=C:\Qt\QtMCUs\3.0.0
    set IAR_TOOLCHAIN_DIR="C:\Program Files (x86)\IAR Systems\Embedded Workbench 9.2"
    
    "%IAR_TOOLCHAIN_DIR%/common/bin/cspybat" "%IAR_TOOLCHAIN_DIR%/arm/bin/armproc.dll" "%IAR_TOOLCHAIN_DIR%/arm/bin/armJET.dll" ^
    --plugin %IAR_TOOLCHAIN_DIR%/arm/bin/armbat.dll ^
    --device_macro %IAR_TOOLCHAIN_DIR%/arm/config/debugger/Nuvoton/KM2KSD4XXX(Gerda-4L).dmac ^
    --flash_loader "%IAR_TOOLCHAIN_DIR%/arm/config/flashloader/Nuvoton/Gerda-4L.board" ^
    --debug_file=%QUL_ROOT%\bin\bootloaders\nuvoton\gerda-4l-uitron_bootloader.elf ^
    --leave_target_running ^
    --backend ^
    --endian=little ^
    --cpu=Cortex-M7 ^
    --drv_vector_table_base=0x0 ^
    --fpu=VFPv5_D16 ^
    -p %IAR_TOOLCHAIN_DIR%/arm/config/debugger/Nuvoton/KM2KSD4XXX(Gerda-4L).ddf ^
    --drv_verify_download ^
    --semihosting ^
    --device=KM2KSD4XXX(Gerda-4L) ^
    --multicore_nr_of_cores=1 ^
    --jet_standard_reset=9,0,0 ^
    --reset_style=\"0,-,0,Disabled__no_reset_\" ^
    --reset_style=\"1,-,0,Software\" ^
    --reset_style=\"2,-,0,Hardware\" ^
    --reset_style=\"3,-,0,Core\" ^
    --reset_style=\"4,-,0,System\" ^
    --reset_style=\"9,ConnectUnderReset,1,Connect_during_reset\" ^
    --drv_catch_exceptions=0xff0 ^
    --jet_board_cfg=%IAR_TOOLCHAIN_DIR%/arm/config/debugger/Nuvoton/KM2KSD4XXX(Gerda-4L).ProbeConfig ^
    --drv_trace_settings=None ^
    --drv_trace_size=25 ^
    --board_file=%IAR_TOOLCHAIN_DIR%/arm/config/flashloader/Nuvoton/Gerda-4L.board
  2. Edit the paths QUL_ROOT and IAR_TOOLCHAIN_DIR.
  3. Open command prompt and run the flash_bootloader.bat script as shown below:
    flash_bootloader.bat

Available under certain Qt licenses.
Find out more.