Report
5 years, 4 months ago.

How to Build HDK Firmware

Hi, I'm struggling to understand how to build the firmware used by the HDK. I know there's a cookbook page that outlines the structure and process but I'm still confused. I'd find it very helpful if there was an idiots guide.

If you be more specific, somebody can update hdk page or just plainly explain here. Are you referring to CMSIS-DAP?

What's your interface you want to build? What's your target?

posted by Martin Kojtal 09 Jan 2014

Sorry yep should have explained more. I've built my own hardware using the hdk. Interface is an lpc11u35 target mcu is lpc1768. Ive been using a prebuilt CMSIS-DAP binary. Now I'd like to try and build my own binary.

posted by Rob Cawsey 09 Jan 2014
Comment on this question

3 Answers

5 years, 4 months ago.

Hi Rob - I'll work on creating a guide to building the CMSIS-DAP project. In the meanwhile, following these steps should get you what you need.

  1. Install Keil uVision MDK-ARM
  2. Clone CMSIS-DAP to your local machine
  3. Navigate to the uVision project files
    • ./interface/mdk/lpc11u35/*.uvproj (NXP targets)
    • ./interface/mdk/k20dx128/*.uvproj (Freescale targets)
  4. Select the project target that represents your hardware
  5. Compile

hey, on compiling the lpc11u35_bootloader project with µVersion5, i get always 2 errors: in "RTX_Config.c" -> can not open source input file "RTX_lib.c" and in "usb_lib.c" -> can not open source input file "..\..\RL\USB\INC\usb.h" where can i get the files?

regards

posted by Volker Schilling-Kästle 13 Jan 2014

Hello Volker Schilling-Kastle,

I have no problems with bootloader project, tested in 4.73 and 5.00 version. Those files are not part of CMSIS-DAP repository, are they?

posted by Martin Kojtal 14 Jan 2014

Looks like you'll also need to install http://www2.keil.com/mdk5/legacy if you have mdk501.exe (and maybe greater)

posted by Sam Grove 14 Jan 2014

thanks Sam, One more question still a bit confused how does the project that creates the flash algorithm fit into this process because i thought the two were combined to create the final binary?

posted by Rob Cawsey 14 Jan 2014

Rob Cawsey wrote:

how does the project that creates the flash algorithm fit into this process

It doesn't. That is only applicable when you are porting to a new target.

Rob Cawsey wrote:

i thought the two were combined to create the final binary

The final binary is created from the uVision project. Just make sure you choose the right project target, in your case, lpc11u35_lpc1768_if

posted by Sam Grove 14 Jan 2014

Thanks for the update.

posted by Rob Cawsey 14 Jan 2014

Hi Sam,

I've just cloned the CMSIS-DAP repository to my PC went to compile and encountered the following error

target_reset.c: Error:  #5: cannot open source input file "..\..\target\hal\DBG_NXP\DBG_LPC810\target_reset.c": No such file or directory
..\..\target\hal\DBG_NXP\DBG_LPC810\target_reset.c: 0 warnings, 1 error
".\Obj\lpc11u35_lpc812_if_mbed.axf" - 1 Error(s), 4 Warning(s).

I did a quick check and it would appear that the path no longer exsist, does the project properties need to updated?

posted by Rob Cawsey 15 Jan 2014

Is this project with in the size restrictions of the evaluation version of Keil uVision MDK-ARM?

posted by Rob Cawsey 17 Jan 2014

thanks @Martin Kojtal now, the next error is there.. from the LPC_IAP Project - FlashPrg.c: error: C3903U: Argument '/ropi/rwpi' not permitted for option 'apcs'. Keil Forum means, that this error is available in eval-version of µVision.. but 1300€ for the full version is to much for me :) any suggestions what i make wrong? the same at V4.XX and V5.XX

thanks!

posted by Volker Schilling-Kästle 30 Jan 2014
5 years, 4 months ago.

I have TWO questions,

1: is it possible to re-map the pins, LED's and the SWD pins, I guess the former would be quite simple. not sure if latter - but would be nice.

2: Is it possible to get the code into the '401' version, with 10K memory, as opposed to the '501' with 12K.

Cheers

Ceri

5 years, 4 months ago.

Hi Ceri,

You can do that.

I have tried to use Arch as a CMSIS DAP board. Arch uses LPC11U24 and has only 8K RAM. It works by remove dynamically generating MBED.HTM file, reducing some threads' stack size and optimizing code for size. The source code is on https://github.com/xiongyihui/CMSIS-DAP/tree/lpc11u24.

Arch

Can you be a bit more specific on how to remove the MBED.htm file? Do I need to change the code? Does your linked source code have all the required changes? I'm trying to use a '401' LPC11U35 to interface with a LPC1768

posted by Jason T 27 Jun 2014

Hi Jason,

To use a '401' LPC11U35 which doesn't have 2K RAM at 0x20000000, the line ( https://github.com/mbedmicro/CMSIS-DAP/blob/master/interface/interface/hal/TARGET_NXP/TARGET_LPC11U35/usb_buf.h#L22 ) must be changed to

uint32_t usb_buffer[FLASH_SECTOR_SIZE/4];

With the changed line, it may work. If not, have a look at https://github.com/xiongyihui/CMSIS-DAP/tree/lpc11u24

posted by Yihui Xiong 01 Jul 2014

When I try that change, I get a bunch of errors:

"": Error: L6406E: No space in execution regions with .ANY selector matching rt_task.o(.bss).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_core.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_msc.o(.bss).
"": Error: L6406E: No space in execution regions with .ANY selector matching read_uid.o(.bss).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_hid.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_user_hid.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching dap.o(.bss).
"": Error: L6406E: No space in execution regions with .ANY selector matching main.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching usb_config.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching version.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching board.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_user_cdc_acm.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching uart.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching swd_host.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching serial.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching gpio.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rt_robin.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rt_task.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rt_timer.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rt_system.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rtx_config.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching read_uid.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching usbd_lpc11uxx.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching rt_time.o(.data).
"": Error: L6406E: No space in execution regions with .ANY selector matching dap.o(.data).
"": Error: L6407E: Sections of aggregate size 0x1c4 bytes could not fit into .ANY selector(s).

"" = '.\Obj\lpc11u35_lpc1768\lpc11u35_lpc1768_if.axf'

For the LPC11u24 project you link, will that work for a LPC1768 as a target, or just a LPC812?

posted by Jason T 02 Jul 2014

Hi Jason, did you ever get anywhere with this? I am trying a similar thing to you and am running into the same problems with lack of documentation.

posted by Richard Osterloh 20 Jan 2015

To post an answer, please log in.