1

RAM_HIGH_ADRS is a parameter defined in config.h and in the makefile. As I understand it, it defines the adress on which the program's data+text+bss segments will be written in the RAM.

Which means, for example, that if the cpu has 64 Mb of RAM, and RAM_HIGH_ADRS equals to 0x00A00000 (10 Mb), the entire program has 54 Mb to work with in terms of storing text+data+bss+heap+stack.

The reason I'm questioning this is I am working on a project where I expanded the data segment by a large margin which caused the cpu to not boot. I then increased RAM_HIGH_ADRS, which at this point allowed the cpu to boot. This confuses me since the only thing that is written between RAM_LOW_ADRS and RAM_HIGH_ADRS, to my understanding, is the VxWorks image, so increasing the RAM_HIGH_ADRS should only lower the available size for the data segment.

  • 1
    Possible duplicate of [Mapping a VxWorks image onto RAM (BSP)](http://stackoverflow.com/questions/9639443/mapping-a-vxworks-image-onto-ram-bsp) – Mogsdad Jan 05 '16 at 15:35

2 Answers2

2

If you are using Vxworks bootrom to boot the board, then here is how it works.

Bootrom gets placed at RAM_HIGH_ADRS. Bootrom then loads the VxWorks Kernel image from network (or any other place based on from you are fetching the vxWorks Kernel image), and place it in RAM starting from RAM_LOW_ADRS.

First it places .text segment and then right after that it places .rodata, .data, and .bss. Therefore there has be enough space between RAM_LOW_ADRS and RAM_HIGH_ADRS that can accommodate .text+.rodata_.data+.bss. If space is not enough then user will see the symptom that you have seen. In such case set RAM_HIGH_ADRS to some higher value so that .text+.rodata_.data+.bss can fit between the RAM_LOW_ADRS and RAM_HIGH_ADRS.

0

from vxworks-bsps-6.7.pdf page 6:

High RAM address. When the bootrom is used, the boot loader places the small VxWorks kernel (the bootrom) at high RAM. The RAM_LOW_ADRS..RAM_HIGH_ADRS is used by the bootrom kernel to store the VxWorks kernel fetched from the network before booting. Usually set to half main memory + 0x3000, for example 0x40203000 on a system with 4Mb RAM.

developer
  • 4,744
  • 7
  • 40
  • 55
  • Does the "VxWorks kernel" stored at RAM_LOW_ADRS..RAM_HIGH_ADRS contain the large expanded data segment of my program? If so, that explains why increasing RAM_HIGH_ADRS allowed the cpu to boot. – Dekel Adler Jan 05 '16 at 14:31