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.

Low-Level Documentation

Other Parts Discussed in Thread: SYSBIOS

Hi There

I'm struggling finding any documentation for the gory low-level implementation details of DSP/BIOS 6. I can find out most of the stuff by single-stepping thru code and looking at the bios source files. Things I'd expect this documentation to cover are (just examples):

- on which stack and heap is code executed that runs before bios is started (i.e. static object initialisation, main() etc.)

- where is the ISR/HWI stack located, how can I control its location and size

- ...

Things like this are quite handy to know for debugging (i.e. HWIs run on the same stack as the one used during startup, i.e before bios is started, so your stack peak will be nonzero even if there has no HWI ocurred so far).

Cheers,

Sam

  • Sam,

    Have you found the "BIOS User Guide", <path-to-bios-6>/docs/Bios_User_Guide.pdf? Section 2.1 SYS/BIOS Startup Sequence, Section 2.2 Overview of Threading Modules, and Section 5.4 Stacks should answer your questions. Please let us know if these descriptions are missing other details that you need.

    Mark

  • Mark

    Yes I found the "BIOS User Guide", although my version (spruex3d) does not have a Section 5.4 about stacks. The document mentions that the HWI stack and SWI stack are on the system stack, but there are no details about how the system stack is reused (i.e. there's an offset of 0x40 bytes to accommodate for something [what?], see Hwi_getIsrStackAddress() in sysbios/family/c64p/Hwi.c). It does not say how tagging the HWI/SWI stack could potentially adversely affect your main() function's stack because you need to call Startup_exec() in a C-only project and that's where the HWI stack (apparently) gets filled with 0xEBEBEBEB to detect stack overflows (btw. the fact that you need to call this function in a C-only project to avoid ending up with uninitialized modules is stated in the XDC Consumer User's Guide (spruex4) only, it might be worth mentioning that important detail in the BIOS User Guide too). It also does not mention how the system stack is used during C++ static object initialization, and how calling Startup_exec() from a constructor (as suggested in spruex4, 4.2 XDC Boot Sequence and Control Points) could interact with the stack your object is constructed on.

    I agree if you think that's too much detail for the User Guide. But as soon as you need to debug HWI and early system start stack issues all these pieces of information suddenly gain importance, so it might be worth to cover topics like these in a separate document.

    Cheers,

    Sam