EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Question: Reserve area of code-space using GNU/Rowley?

Started by joly...@mac.com August 28, 2008
Hello,

I have been successfully moving our code-base across from Greenhills to Rowley. For historical reasons all our systems rely on there being 4 bytes (0xFFFFFFFF) reserved at the end of the first 64KB of application. Additionally, I need to ensure that the application is runnable even if only the first 64KB is in place. These things are achieved in Greenhills using a fairly complex linker directive file.

To summarise, the code section is:

Address
====0x80000000 - Code for 64k - 4bytes
0x8000FFFC - 4 Bytes reserved
0x80010000 - Rest of application....

I have queried whether or not this is achievable with Paul@Rowley who thinks it probably is not, or I have explained myself inadequately. As such I had been investigating Keil with RealView which can achieve the required using the absolute library .

I am struggling with uVision which is crashing a lot on me. I would much rather have this going with Rowley and GNU if at all possible. There must be an elegant solution.

Any suggestions you may have would be really appreciated.

KR,

Jolyon

An Engineer's Guide to the LPC2100 Series

The way that we have accomplished reserving memory locations for CRC and
Checksum type values is to create a "Memory Map Node" in the area you
want.

For our application in the FLASH area we created a "Memory Map Node"
called "APPCHKSUMCRC" and defined its start address as 0x80000000, this
is used to store our CRC values of the application code. This is all
located in "Phillips_LPC_MemoryMap_XXXX.xml" under "Systems Files" in
the Rowley Project explorer.

Then in the code place the assignment:
#define APPCHKSUMCRC __attribute__ ((section ("APPCHKSUMCRC")))
DECLARE APPCHKSUMCRC INT16U const AppChecksum
Hope this gets you going in the right direction.

Jeff Milender
Systems Engineer
Cargo Systems
Goodrich Interiors
2604 Highway 20 North
Jamestown, ND 58401
Tel: 701-253-7569
J...@goodrich.com
http://www.goodrich.com

________________________________

From: l... [mailto:l...] On Behalf
Of j...@mac.com
Sent: Thursday, August 28, 2008 11:10 AM
To: l...
Subject: [lpc2000] Question: Reserve area of code-space using
GNU/Rowley?

Hello,

I have been successfully moving our code-base across from Greenhills to
Rowley. For historical reasons all our systems rely on there being 4
bytes (0xFFFFFFFF) reserved at the end of the first 64KB of application.
Additionally, I need to ensure that the application is runnable even if
only the first 64KB is in place. These things are achieved in Greenhills
using a fairly complex linker directive file.

To summarise, the code section is:

Address
====0x80000000 - Code for 64k - 4bytes
0x8000FFFC - 4 Bytes reserved
0x80010000 - Rest of application....

I have queried whether or not this is achievable with Paul@Rowley who
thinks it probably is not, or I have explained myself inadequately. As
such I had been investigating Keil with RealView which can achieve the
required using the absolute library .

I am struggling with uVision which is crashing a lot on me. I would much
rather have this going with Rowley and GNU if at all possible. There
must be an elegant solution.

Any suggestions you may have would be really appreciated.

KR,

Jolyon


Hi Jeff,

Thanks for your response. The problem I need to overcome is the placement of the
reserved area (it is for checksum etc.) at the end of the 64k block i.e. at BASE_ADDRESS +
64k - 4. In some ways it doesn't matter where the checksum resides provided the entire
64k sums to zero but unfortunately all our legacy systems such as the over-the-air
upgrade system inserts the checksum at that point otherwise I would move it to the
beginning as you imply.

Thanks,

Jo

--- In l..., "Milender, Jeff" wrote:
>
> The way that we have accomplished reserving memory locations for CRC and
> Checksum type values is to create a "Memory Map Node" in the area you
> want.
>
> For our application in the FLASH area we created a "Memory Map Node"
> called "APPCHKSUMCRC" and defined its start address as 0x80000000, this
> is used to store our CRC values of the application code. This is all
> located in "Phillips_LPC_MemoryMap_XXXX.xml" under "Systems Files" in
> the Rowley Project explorer.
>
> Then in the code place the assignment:
> #define APPCHKSUMCRC __attribute__ ((section ("APPCHKSUMCRC")))
> DECLARE APPCHKSUMCRC INT16U const AppChecksum
> Hope this gets you going in the right direction.
>
> Jeff Milender
> Systems Engineer
> Cargo Systems
> Goodrich Interiors
> 2604 Highway 20 North
> Jamestown, ND 58401
> Tel: 701-253-7569
> Jeff.milender@...
> http://www.goodrich.com
>
>
> ________________________________
>
> From: l... [mailto:l...] On Behalf
> Of jolyon.latham@...
> Sent: Thursday, August 28, 2008 11:10 AM
> To: l...
> Subject: [lpc2000] Question: Reserve area of code-space using
> GNU/Rowley?
>
> Hello,
>
> I have been successfully moving our code-base across from Greenhills to
> Rowley. For historical reasons all our systems rely on there being 4
> bytes (0xFFFFFFFF) reserved at the end of the first 64KB of application.
> Additionally, I need to ensure that the application is runnable even if
> only the first 64KB is in place. These things are achieved in Greenhills
> using a fairly complex linker directive file.
>
> To summarise, the code section is:
>
> Address
> ====> 0x80000000 - Code for 64k - 4bytes
> 0x8000FFFC - 4 Bytes reserved
> 0x80010000 - Rest of application....
>
> I have queried whether or not this is achievable with Paul@Rowley who
> thinks it probably is not, or I have explained myself inadequately. As
> such I had been investigating Keil with RealView which can achieve the
> required using the absolute library .
>
> I am struggling with uVision which is crashing a lot on me. I would much
> rather have this going with Rowley and GNU if at all possible. There
> must be an elegant solution.
>
> Any suggestions you may have would be really appreciated.
>
> KR,
>
> Jolyon
>
>
>


Memfault Beyond the Launch