strange behavior when flashing in RAM
I write a program, send 0x55 via UART, and set the system timer for 1000 calls per second.
the program is recorded to FLASH and works as expected.
then I change the address for the firmware in the linker, instead of the flash drive I write to RAM.
I change the code, stop using UART in the system timer handler at all, and lower the timer call rate to 10 per second.
in the Makefile, for reliability, the first line is deleting old files.
when i write to RAM, the system timer run on new values. and UART works as on the old firmware, although I don't use it at all.
here are the lines in the make file
rm $(FIRMWARE_NAME).elf $(FIRMWARE_NAME).hex $(FIRMWARE_NAME).asm
$(COLORIZER) arm-none-eabi-gcc $(CFLAGS) -o $(FIRMWARE_NAME).elf $(SRCS) $(LDSCRIPTS) $(LDFLAGS)
$(COLORIZER) arm-none-eabi-objcopy -O ihex $(FIRMWARE_NAME).elf $(FIRMWARE_NAME).hex
$(COLORIZER) arm-none-eabi-objdump -h -d $(FIRMWARE_NAME).elf > $(FIRMWARE_NAME).asm
st-flash --format ihex write $(FIRMWARE_NAME).hex
arm-none-eabi-size $(FIRMWARE_NAME).elf
and linker
FLASH(rx) : ORIGIN = 0x20004E20, LENGTH = 20K
RAM(xrw) : ORIGIN = 0x20000000, LENGTH = 20K
CCM(rw) : ORIGIN = 0x10000000, LENGTH = 8K
}
SECTIONS
{
.isr_vector :
{
. = ALIGN(4);
_isr_vectors_offs = . - 0x20004E20;