Content originally posted in LPCWare by dimasusl on Tue Nov 16 06:59:02 MST 2010
Quote: CodeRedSupport
If you need more help, then please post an example project that shows up the problem. To export your project from your workspace, use:
Quickstart Panel - Import and Export - Export projects to archive (zip)
Regards,
CodeRedSupport
I work with project that shows how to work with MPU support in FreeRTOS on LPC1768, so i get this project "as is" and add there function "some_func". This function return value "10" in integer.
Than i defined in .ld "some_func_clone" as absolute address of "some_func"+1.
In funtion "prvSetupHardware" i call this:
some_func_ret = some_func(); // 10
some_func_ret = some_func_clone()+1; // 11
In .lss is the same in both variants, but "some_func" calls via bl instruction, and "some_func_clone" via blx. When call "some_func_clone" the hardfault exception is happend.
PS No need to look no sense, it's just an example. In the end, is expected to cause different functions of the user applications, which will be uploaded in a separate area of flash memory.