9 years, 11 months ago.

k20dx128_bootloader program example 2 error on Keil v5

Rebuild target 'k20dx128_bootloader'
Before Build - User command #1: python ..\..\..\tools\pre_build_script.py
--- Error: User Command terminated, Exit-Code = 1
assembling startup_MK20D5.s...
compiling system_MK20D5.c...
compiling flash_svc.c...
compiling main.c...
compiling RTX_Config.c...
assembling SVC_Table.s...
compiling usb_config.c...
compiling usbd_user_msc.c...
compiling version.c...
..\..\Common\inc\mbed_htm.h(30): error:  #67: expected a "}"
  "<!-- Version: " FW_BUILD " Build: " __DATE__ " " __TIME__ " Git Commit SHA: "  GIT_COMMIT_SHA " Git local mods:" GIT_LOCAL_MODS_STR"-->\r\n"
..\..\Common\inc\mbed_htm.h(38): warning:  #12-D: parsing restarts here after previous syntax error
  "\r\n"};
..\..\Common\src\version.c: 1 warning, 1 error
compiling gpio.c...
compiling read_uid.c...
compiling usbd_MK20D5.c...
compiling vector_table.c...
compiling flash_hal.c...
compiling usbd_core.c...
compiling usbd_core_msc.c...
compiling usbd_msc.c...
compiling HAL_CM3.c...
compiling rt_Event.c...
compiling rt_List.c...
compiling rt_Mailbox.c...
compiling rt_MemBox.c...
compiling rt_Mutex.c...
compiling rt_Robin.c...
compiling rt_Semaphore.c...
compiling rt_System.c...
compiling rt_Task.c...
compiling rt_Time.c...
compiling rt_Timer.c...
compiling flash_command_sequence.c...
compiling flash_densities_k_series.c...
compiling flash_erase.c...
compiling flash_erase_all.c...
compiling flash_init.c...
compiling flash_program.c...
compiling flash_verify_erase.c...
compiling flash_verify_erase_all.c...
compiling flash_verify_program.c...
".\Obj\k20dx128_bootloader.axf" - 2 Error(s), 1 Warning(s).
Target not created

4 Answers

9 years, 11 months ago.

Hello,

I am able to build the program in the latest master on CMSIS-DAP repo. what keil version do you use?

Thank you very much for your expertise my compiler is KEIL version:5.10.00

posted by Sacchetti Giampaolo 20 May 2014

IT is working for me in the 4.x version and also in 5.10.02 version for example, the latest master, as it is today.

posted by Martin Kojtal 28 May 2014
9 years, 7 months ago.

Hello Sam Grove,

I have the same problem... Do you have a solution please?

Thanks

Please use uVision 4.7x

posted by Sam Grove 09 Oct 2014
9 years, 11 months ago.

We are currently using Keil 4.7x for CMSIS-DAP. I suggest you revert for the time being.

8 years, 8 months ago.

I have same question with you, but I find out the reason.

In Summary 1. you must use git to download the source code and install git.exe to the PATH variable of OS. Windows PATH variables: http://www.computerhope.com/issues/ch000549.htm#windows7

Or when you install msysgit on Windows, please select the option: Run Git from the Windows Command Prompt details, see here: https://jira.atlassian.com/browse/STASH-2536

2. install python2.X, not use python3.x , see https://community.freescale.com/docs/DOC-100720 3. install python.exe to the PATH variable, the same as 1, you can check in Windows CMD, type python, will prompt python version and commands.

4. If you get an error similar to the one shown below, make sure you have installed the Legacy pack for ARM as previously described earlier: compiling RTX_Config.c... ..\..\Common\src\RTX_Config.c(184): error: #5: cannot open source input file "RTX_lib.c": No such file or directory

and

compiling usb_config.c... ..\..\..\shared\USBStack\INC\usb_lib.c(18): error: #5: cannot open source input file "..\..\RL\USB\INC\usb.h": No such file or directory

download from here http://www2.keil.com/mdk5/legacy

5. I use MDK-ARM 4.60, it prompts Error: User Command terminated, but with MDK-ARM 5.11, it is OK.