This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Do I REALLY need a scatter file (and license ?)

Hi all.
I'm using CortexM3 (STM32F103VB) with Keil uVision3 v.3.85.
I've developed my own bootloader allocated between 0x08000000 and 0x08001FFF.
4 bytes from 0x08002000 to 0x08002003 are used for FW checksums.
Bytes from 0x080002004 on are used for FW.
The bootloader writes the whole FW and checksum area.
The FW checks itself against its checksums at startup.
The bootloader terminates with the usual (from application notes) sequence:

JumpAddress = *(__IO uint32_t*) (0x08002004 + 4);
Jump_To_Application = (pFunction) JumpAddress;
__set_MSP(*(__IO uint32_t*) (0x08002004));
Jump_To_Application();

while the fw start with the usual sequence:

SystemInit();
NVIC_SetVectorTable(NVIC_VectTab_FLASH,0x2004);

In the sample fw project target properties, the default memory area starts from 0x08002004 and is 0x1DFFC bytes long, while in the linker tab the "Use Memory Layout from Target dialog" is checked.

The sample fw project decalres the checksum area as

static const CHECKSUMS_ST C_Checksums __attribute__((at(0x08002000)));

PROBLEM: irq are not working in the sample fw (in the sample I only use systick).

If I remove the whole checksums stuff and make the sample project starting from 0x08002000 all is working fine.

Could the problem be caused by the fact the that the linker is told to begin at 0x8002004 and then the firmware access the checksums placed before ?

Do I need a more complicated scatter file to get things working ? (I'm asking mainly because I'm stuck with the unlicensed version at this project stage (and it does not support scatter files, does it ?).

Could the problem be due to another of the unlicensed version limits ?

Inspection with debugger memory windows shows that the flash is correctly written in both cases, The Stack Pointer is set at the same value (in RAM) and the reset vector points to locations that differs of 4 bytes between the two versions. All seems well but... irq is not working (or at least this is what it seems to me by the behavior of the sample fw).

What am I missing ?