This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

beaglebone StarterWare CMD files

I need some help in parsing the beaglebone CMD files in StarterWare. I have gotten what I could from the ARM Assembly Language Tools V4.9 User's Guide. However, questions remain:

Let's take enetLwip.cmd for example:

        DDR_MEM        : org = 0x80000000  len = 0x7FFFFFF           /* RAM */   

This specifies the size of the DDR memory as 0x7ffffff or 134,217,727 bytes. This is one byte short of 128MB; why one byte short? The beaglebone actually has 256MB DDR2 400MHZ. I would have expected the size then to be: len = 0x10000000

-stack  0x0008

The specifies the SIZE of the "C System" stack section as 8 bytes! I would have expected a significantly larger stack. The linker default is 2KB.

    .stack   : load > 0x87FFFFF0           /* SOFTWARE SYSTEM STACK         */  

This Specifies the beginning of the "C System" stack 15 bytes before the end of the memory size specified above. This leaves 7 more bytes than the stack size specified above. I would have thought the stack would be positioned so that it ended at the last byte of memory. Is there an alignment requirement that must be met; or unused space at the of the physical memory required?

  • Hi Jon,

    You can definitely keep the stack at the end of the 256MB DDR. There is no particular reason to be at the end of 128MB or so. According to your requirement you can modify the end.

    [

    Jon:This Specifies the beginning of the "C System" stack 15 bytes before the end of the memory size specified above. This leaves 7 more bytes than the stack size specified above. I would have thought the stack would be positioned so that it ended at the last byte of memory. Is there an alignment requirement that must be met; or unused space at the of the physical memory required?

    ]

    - The alignment requirement is only that the SP to be 8 byte aligned. As I stated above, you can keep it anywhere. In Starterware, the stack is kept at the end and size is specified 8. This is just to keep similar to GCC project, where the stack just grows down and no limit is specified. But as you rightly said, you can give the proper stack size, say 10K or so.

    Regards,

    Sujith