Problems with bootloader

Hi All,

I have just downloaded the latest patches for NetOS so that everything is up to date.

I have then used ESP to generate a new NetOS project for the ConnectCore9P 9215. Only changes to the default new project settings are to enable SNTP, and to set stdio port to NONE and dialog port to none.

I then built the release configiuration.

I downloaded the release image.bin and all is OK. I then downloaded the new bootloader rom.bin. At this point the unit fails to boot, and the yellow LED on the module flashes.

I then connect via JTAG and run the application under the debugger. This time it boots Ok and I download the release image.bin again (Noe this is exactly what should be in there).

Once that is downloaded it all works again.

It seems that downloading the rom.bin bootlader corrupts the application image, so I then have to relaod it, but this means that it is not possible to download the bootlader without then having to use JTAG to repair the main application.

Has anyone else found this problem or does anyone know what I am doing wrong?


It sounds like your boot loader grew beyond the allotted 64k in flash. If that’s the case, you can try to shrink it (remove any changes to the boot loader code you may have made), or you need to change your flash layout so that the boot loader takes up the first 128K, and your application image starts at 0x20000.

To get this to work you need to change:

  1. BOOTLOADER_SIZE_IN_FLASH to 128K - in customize.ldr
  2. flashOffset to 0x20000 - in bootldr.dat
  3. any firmware upload routines you have in place, change it so image.bin loads into flash at the 0x20000 offset (instead of 0x10000)

Also be aware that the default image.bin that ships on the units expects image.bin to be loaded into 0x10000, so you will need to create a combined rom.bin and image.bin (rom.bin + 0xFF padding out to the 128K mark + image.bin) to load it in the first time you update the boot loader and application image on the module.


Since I posted I have tried changing the bootloader size to 128K as you suggest. This now works fine once both the bootloader and the main image are loaded.

As you say there is a problem on the first download, which I am getting round by using JTAG to get rom.bin and image.bin in the first time and then it is Ok.

Your suggestion about building the combined image sounds very good and seems to be the way forward. Do you have any tips on what tools to use to generate a combined image, and what to call it and the best way to download it?


Attached is a niffty little tool I picked up a little while ago that merges files. You need to call it ‘rom.bin’ to upload it correctly with the default firmware images.


Many thanks for that I will try it out as soon as I can

Has anyone successfully used the MergeImages utility? When I try to run it I just get an error message: “MergeImages has encountered a problem and needs to close.”

I’ve tried various command line options without success.


I use MergeImages for each complete release that I generate.

On the CC9P code I point Rom.bin patrh to the release directory file. I then point Image.bin path to the Debug version. Set the length correctly (128K for me). Then I point Merged Rom.bin to the debug dirctory, and hit the button.

Then I release the new rom.bin and download via the web interface. All seems to work fine for me.

Not sure about the command line options. I have a windows app. that does not seem to need any command options. I just run from a shoortcut pointing to the exe file

Thanks for that - must be something to do with my system. I’m using the file charliek provided - just unzip and run and I get the error. No UI screen or anything. Running on XP.
Nothing in the event log to indicate the nature of the problem.

Solved - obviously not a standalone program.

I copied it to the bin directory of my net+O/S installation, and now works fine.

Maybe this program should become part of future distributions.