TrampolineRTOS / trampoline

Trampoline is a static RTOS for small embedded systems. Its API is aligned with OSEK/VDX OS and AUTOSAR OS 4.2 standards.
GNU General Public License v2.0
599 stars 263 forks source link

STM32F407G Timing and Memory Protection not working? #165

Open sai-act opened 2 weeks ago

sai-act commented 2 weeks ago

Hello! so I have with me an STM32f4discovery board and I am seeing these errors when compiling the example blink project. I have only added this code to the blink TASK in my blink.oil file.

TIMING_PROTECTION = TRUE {
          EXECUTIONBUDGET = 1; 
          TIMEFRAME = 1;
    };

and changed the oil version to 4.0 OIL_VERSION = "4.0";

The goil compilation is successful but I am not able to build the executable and these are errors I am seeing when I run make.py:

arm-none-eabi-ld: build/autosar/tpl_as_timing_protec.c.o: in function `tpl_tp_on_activate_or_release':
/home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:133: undefined reference to `tpl_get_tptimer'
arm-none-eabi-ld: build/autosar/tpl_as_timing_protec.c.o: in function `tpl_tp_on_terminate_or_wait':
/home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:178: undefined reference to `tpl_cancel_tpwatchdog'
arm-none-eabi-ld: build/autosar/tpl_as_timing_protec.c.o: in function `tpl_tp_on_start':
/home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:200: undefined reference to `tpl_get_tptimer'
arm-none-eabi-ld: /home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:221: undefined reference to `tpl_set_tpwatchdog'
arm-none-eabi-ld: build/autosar/tpl_as_timing_protec.c.o: in function `tpl_tp_on_preempt':
/home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:239: undefined reference to `tpl_get_tptimer'
arm-none-eabi-ld: /home/sai/clean_test/trampoline/examples/cortex-m/armv7em/stm32f407/stm32f4discovery/blink/../../../../../../autosar/tpl_as_timing_protec.c:242: undefined reference to `tpl_cancel_tpwatchdog'
Return code: 1
1 error.

How do I resolve this?

Also I would like to enable Memory protection

WITH_MEMORY_PROTECTION

When set to YES, Trampoline enables the memory protection facility. This is only supported on some ports (MPC5510 and ARM9 at time of writing). Memory protection requires the memory mapping and the use of system call. WITHMEMORY- PROTECTION is set to YES/NO with the MEMORY_PROTECTION at- tribute of MEMMAP object (see ??) set to TRUE/FALSE.

I understand the port is still unsupported on Cortex-M4. What should be my next steps to port it my platform? any guidance is very much appreciated.