EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Problems with IAR flash loader

Started by Hard...@allenvanguard.com August 19, 2010
Hi,

I'm having some issues when I try to use the flash loader in the IAR IDE for device: LPC2138. I get an error saying "Writing outside flash memory at address 0x40000080". In the Projects>Options>Debugger, download tab I selected "Use flash loader(s)". At first I let it choose the default file, however I get the above error. Next I tried using the "Override default .board file" and selected the file called FlashNXPLPC512K1.board and then later FlashNXPLPC512K2.board, however they both give me the same error when I try to use the flash loader. Can you please tell me how I can correct this problem?

Thanks.
hgida

An Engineer's Guide to the LPC2100 Series

On Thu, 19 Aug 2010 11:05:21 -0400, you wrote:

>Hi,
>
>I'm having some issues when I try to use the flash loader in the IAR IDE for device: LPC2138. I get an error saying "Writing outside flash memory at address 0x40000080". In the Projects>Options>Debugger, download tab I selected "Use flash loader(s)". At first I let it choose the default file, however I get the above error. Next I tried using the "Override default .board file" and selected the file called FlashNXPLPC512K1.board and then later FlashNXPLPC512K2.board, however they both give me the same error when I try to use the flash loader. Can you please tell me how I can correct this problem?
>
>Thanks.
>hgida

Sounds like you are trying to load a program that has its linker settingsset to run in RAM.

>
>
From: l... [mailto:l...] On Behalf
Of Mike Harrison
Sent: August 19, 2010 11:19 AM
To: l...
Subject: Re: [lpc2000] Problems with IAR flash loader

In the Project>Options>Linker>Config tab, I have selected the file
"Flash.icf", not the "RAM.icf" file.

This is what I'm doing to load my hex file: Project>Download>Download
file... It then asks me to select a .out file. After I make the
selection and click ok, I get the error "Writing outside flash memory at
address 0x40000080".

I took a look into the FlashNXPLPC512K1.board file and I noticed
something weird. It says the following:

<?xml version="1.0" encoding="iso-8859-1"?>



$TOOLKIT_DIR$\config\flashloader\NXP\FlashLayout3RAM32K.out

256

8 0x1000

14 0x8000

5 0x1000

0x00000000

$TOOLKIT_DIR$\config\flashloader\NXP\LPC21xx22xx.mac

1

[--clock] Passes the clock frequency to the flash loader;

value is the CPU clock speed in kHz. The default clock

frequency value is 14,746 kHz.



I'm assuming that 14 0x8000 is defining flash sector 14
as being 32K in size. If that is the case, 8 0x1000 is
defining flash sector 8 as being 4K in size. However, in the user manual
for the LPC2138, flash block 8 is supposed to be 32K in size.

I should mention I'm using the 32K code limited version of the IAR IDE.
Could this be the reason?

Thanks.

hgida

On Thu, 19 Aug 2010 11:05:21 -0400, you wrote:

>Hi,
>
>I'm having some issues when I try to use the flash loader in the IAR
IDE for device: LPC2138. I get an error saying "Writing outside flash
memory at address 0x40000080". In the Projects>Options>Debugger,
download tab I selected "Use flash loader(s)". At first I let it choose
the default file, however I get the above error. Next I tried using the
"Override default .board file" and selected the file called
FlashNXPLPC512K1.board and then later FlashNXPLPC512K2.board, however
they both give me the same error when I try to use the flash loader. Can
you please tell me how I can correct this problem?
>
>Thanks.
>hgida

Sounds like you are trying to load a program that has its linker
settingsset to run in RAM.
>
>
>
>Yahoo! Groups Links
>

This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.

Thank you.
In the Project>Options>Linker>Config tab, I have selected the file “Flash.icf”, not the “RAM.icf” file.

This is what I’m doing to load my hex file: Project>Download>Download file... It then asks me to select a .out file. After I make the selection and click ok, I get the error “Writing outside flash memory at address 0x40000080”.

I took a look into the FlashNXPLPC512K1.board file and I noticed something weird. It says the following:
<?xml version="1.0" encoding="iso-8859-1"?>


$TOOLKIT_DIR$\config\flashloader\NXP\FlashLayout3RAM32K.out
256
8 0x1000
14 0x8000
5 0x1000
0x00000000
$TOOLKIT_DIR$\config\flashloader\NXP\LPC21xx22xx.mac
1
[--clock] Passes the clock frequency to the flash loader;
value is the CPU clock speed in kHz. The default clock
frequency value is 14,746 kHz.


I’m assuming that 14 0x8000 is defining flash sector 14 as being 32K in size. If that is the case, 8 0x1000 is defining flash sector 8 as being 4K in size. However, in the user manual for the LPC2138, flash block 8 is supposed to be 32K in size.

I should mention I’m using the 32K code limited version of the IAR IDE. Could this be the reason?

Thanks.
hgida
Hi,
>
>I'm having some issues when I try to use the flash loader in the IAR IDE for device: LPC2138. I get an error saying "Writing outside flash memory at address 0x40000080". In the Projects> Options> Debugger, download tab I selected "Use flash loader(s)". At first I let it choose the default file, however I get the above error. Next I tried using the "Override default .board file" and selected the file called FlashNXPLPC512K1.board and then later FlashNXPLPC512K2.board, however they both give me the same error when I try to use the flash loader. Can you please tell me how I can correct this problem?
>
>Thanks.
>hgida
>

The 2024 Embedded Online Conference