so I'm trying to compile a debug build of our code, the production build works fine, but debug doesn't build. Following error happens:
>FRun_and_wait_in_RAM(.RAW_RAM) in file FlashProgMemory_c.obj is referenced
>but has not been written.
>Check your linker command file.
In the C file, the function Run_and_wait_in_RAM is there, in it's own section. This section isn't declared in the linker file. I've tried changing it to ram that IS declared in the linker, and it still doesn't work.
So there's a pragma with the section define mapped to .RAW_RAM, and a pragma section end after the function. The functions are static ASM.
There are no processor expert beans for the flash, and I can't find any. It's a CW10.6 project.
Anyone with any ideas?
I believe this was fixed a while back. Didn't know this post was outstanding, thanks for help / regard this as fixed,
Here's the function code btw:
** Method : Run_and_wait_in_RAM (bean IntFLASH)
** Description :
** This method runs programming or erasing process end waits
** until it ends. This routine is placed in RAM.
** This method is internal. It is used by Processor Expert only.
#pragma define_section RAW_RAM_section ".RAW_RAM" RWX
#pragma section RAW_RAM_section begin
static asm void Run_and_wait_in_RAM(dword address, word data, word command)
move.l A10,R2; /* Move given address to pointer register */
move.w Y0,p:(R2)+; /* Write data to the address in program memory */
#pragma section RAW_RAM_section end
I think it is okay for you to debug if you run code in internal program RAM, as you know that the api function is saved in program flash Run_and_wait_in_RAM(). and it is copied to program RAM by the api function:
/* Copy FLASH process routine to program RAM. All program or erase processes will be launched and wait for their end in this routine */
mempcpy(((dword)&_LWIR_ROM_addr_high<<16)+(dword)&_LWIR_ROM_addr_low, ((dword)&_LWIR_RAM_addr_high<<16)+(dword)&_LWIR_RAM_addr_low, (word)(dword)&_LWIR_size);
after the code is copied into internal program RAM, I think you can debug.
Hope it can help you