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.

Enabling BIOS 6.x Exception and MemoryProtect modules

Other Parts Discussed in Thread: SYSBIOS

Hi,

I have a similar problem like it's described here: http://e2e.ti.com/support/embedded/bios/f/355/t/212913.aspx

Except that I use a newer BIOS version: 6.33.6.50

I don't see this illegal access to 0x0184A280 as described by Jonathan White, so the solution he proposed does not work for me.

But when I look at the EVTEXPMASK Register (0x018000c0 - 0x018000cc) I don't see the MPC events enabled.

Yes I have the MPC handling enabled for the Exception module in the .cfg file.

I found three workarounds:

1. manually enable the MPC events after startup

- With this way the exceptions are at least recognized and the handler is called

- But the Exception_enableExternalMPC part of the exception handler is still not executed

2. copy the source code of the SYSBIOS exception handler (including startup routine) and hook the corresponding functions to the use exception handler (e.g. Exception.exceptionHook = "&exceptionHandler"; in the .cfg file)

- works. But I still don't understand why it's not working with the standard BIOS functions, since I just copy SYSBIOS source code

3. Setting this line to .cfg file: BIOS.libType = BIOS.LibType_Custom; like described in the other thread.

Did you fixed the bug in BIOS 6.32.05.54 by replacing by another bug in version 6.33.6.50 ?

What excactly does "BIOS.libType = BIOS.LibType_Custom;" mean?

Regards Fabian

  • Fabian,

    We were not able to determine what was causing Jonathan's issue.  There was no bug filed because we could not reproduce the problem on our end.

    BIOS.libType = BIOS.LibType_Custom simply means you do not link with a pre-built library shipped with SYSBIOS but instead the necessary source files are compiled together during your project build.  A default custom build options are more optimal than the libraries shipped with SYSBIOS.

    What device are you seeing this on?  What codegen tools are you using? Are you able to reproduce the issue with a simple example?

    In #2.  Where are you copying this code?  I assume into your main()?  If so when you get to main() can you check the exception registers to see if any exception was generated?  In Jonathan's case an exception was being triggered early however, we were not able to determine who was causing the exception.  Again, we were not able to reproduce it at our end and it only happened with Johnathan's app.

    Judah

  • Hi,

    here are the tools I'm working with:

    • device C6678
    • platform: ti.platforms.evm6678
    • compiler version 7.4.2
    • XDCtools 3.23.4.60
    • MCSDK PDK 1.1.2.5
    • SYSBIOS 6.33.6.50

    The error is easy to reproduce:

    • Just create a new project,
    • add .cfg file & exception module, 
    • set "enable print" to see when an exception occured
    • enable handling of memory protection
    • test it by causing a memory exception: e.g. int test = *(volatile int *)0x00000000;

    I can only see an exception if: BIOS.libType = BIOS.LibType_Custom

    judahvang said:
    In #2.  Where are you copying this code?  I assume into your main()?  If so when you get to main() can you check the exception registers to see if any exception was generated?  In Jonathan's case an exception was being triggered early however, we were not able to determine who was causing the exception.  Again, we were not able to reproduce it at our end and it only happened with Johnathan's app.

    I copy the code from startup routine (Int Exception_Module_startup(Int phase)) to my main. I copy to the code from all the exception handlers to my own custom exception handlers and hook them in using SYSBIOS exception module. So basically each exception is processed twice, once by the BIOS exception handler and once by my custom handlers (which have the identical source code).

    As I've said I don't see any exceptions pending, when I enter the main(). This is a different problem, than that one Jonathan had.

    Regards Fabian

  • Fabian,

    We understand the problem now.  It has to do with the non custom BIOS library build.  In short, basically the code in Exception_Module_startup() which enables external MPC exceptions is melted away and isn't getting called.  The current workaround would be to build with a custom BIOS library until this is fixed in SYSBIOS 6.35.01

    Thanks for the help in finding this.

    Judah