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

Keil Linker & CM3 Memory [SOLVED]

Hi, I'm working with the LPC1768 and I'm trying to use a reserved memory area to enumerate the address of some variabile that are stored on an external spi flash.

I've made with success the same thing on an LPC2376 (ARM7) but with the cortex I've got an error when I try to enter in debug mode:

"Error: Could not load file project.axf Debugger Aborted!"

I've tested that if I move my vars from the 'off-chip' area to the internal one everything is working.

In the target option I set:

ROM1: 0x80000000 SIZE: 0x100

And in the code I use this code:

const  uint32_t ee_test     __attribute__((at(0x80000000)));

When I start debugging session I got on the console:

Load "L:\\PROGETTI\\project.AXF"

Full Chip Erase Done.

No Algorithm found for: 80000000H - 8000001FH

Partial Programming Done (areas with no algorithms skipped!)

Application running ...

But then keil gives me an error and abort the debug session.

Maybe there is another way to map some variabile in off-chip rom sections?

Thanks to all!

  • Hello Samuele,

    there are a few issues here that prevent you from doing it as proposed:

    • The LPC1768 does not have an external address bus, so there is no chance to address off-chip ROM
    • The memory area 0x80000000 is within a reserved area (the right one should be 0x80000)
    • Also, it seems that there is no flash programming algorithm selected. Can you please check Options for Target (ALT+F7) --> Utilities tab --> Settings button. A new window opens. Is there any flash programming algorithm shown? If not, click on Add and select the right algorithm for your target.

    In general, I would recommend to contact Keil support with these kind of questions: Technical Support Request.

    Kind regards,

    Christopher

  • Hi Christopher,

    I don't want to access to the external memory directly from the LPC, but only to use the compiler to create the link for some constant vars to that address range.

    This is useful because it's not necessary to specify manually the addresses of these variables, considering size, etc.

    I've successfully used this method with the LPC2368 (ARM7), but now with the LPC1768 I can't enter in the debug session. I suppose it's related to the Cortex architecture.

    Now I'll also contact the keil support.

    Thank you!

    Samuele


  • Hi guy's I've solved my problem. As I discover it was related to the debug session I create a fake alghoritm to talk with the  external eeprom (specifying the areas).

    I've cloned another SPI_EEPROM flash algorithm from the keil dir and left all the function empty (leave just the 'return 0' instruction), copied it in the algorithm folder and added to my project debug settings.

    Follow the Keil UserManual instruction at uLINK2 "Setup Flash Programming" page.

    Now it's working fine.

    BR,

    Samuele.