2003-06-02 10:53 PM
2003-05-28 10:06 AM
Hello again.
I used the stpc development and STPC Boot software kits to build a bootloader for my Consumer-S evaluating Board. I used MASM 6.11 to build the rom image from sources provided by STPC Boot Software Kit, but the result is a 8Kb rom image in contrast with the 4Kb image required by the STPC development kit ''build'' script . I have read on the pdf document that the 4kb atlas rom image provided with stpc devlop kit has been compiled with the stpc boot software. But I cannot modify the asm source in the right way to obtain such dimension. Besides in loader.asm there are these defs: @DEF COPY_FROM, 0FFFF0000h ; address of region to copy @DEF COPY_TO, 000010000h ; address of destination @DEF COPY_COUNT, -LOADER_SIZE-COPY_FROM ; # bytes to copy (0=no copy) @DEF RUN_LOADER, 000010000h ; address of secondary loader to jump to while the pdf in ''Building and configuring the primary loader'' Section: For a 128KB loader: Copy from: 0xFFFE0000 Copy to: 0x00080000 Copy Count: 0x0001F000 Jump address: 0x00080000 I have a 128k Flash, just like the original evaluating board bios one. Some suggestion?2003-06-02 10:53 PM
The informations concerning the location of the secondary loader in flash are stored in a table at the beginning of the primary loader. It is possible to modify it with a binary editor after the compilation in place of playing with the source code (less risky, I think...).
Find attached the LoaderCfg.exe file which will enable you to do the operation under Windows. In fact, I don't think you need to modify those parameters, modify the Makefile of the secondary loader should be enough: rom/$(GDKLOADER).rom: $(GDKLOADER).strip dd conv=sync bs=124k if=$(GDKLOADER).strip of=$(GDKLOADER).block cat $(GDKLOADER).block rom/primary.rom > rom/$(GDKLOADER).rom The bs=124k expect your primary loader is 4k large so the concatanation will generate a 128k file. If you replace by bs=120k it should be ok for your 8k primary loader. The location of the secondary loader in flash will be unmodified, still at the beginning of the 128k. Farfalla ________________ Attachments : LoaderCfg.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HtsT&d=%2Fa%2F0X0000000aYG%2FPOWek7dRDIlvxU0YjfMexzg868xhhifki.JC2ry0OkU&asPdf=false