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
620 stars 269 forks source link

NXP DEVKIT-MPC57xx Support. #76

Open dapperfu opened 6 years ago

dapperfu commented 6 years ago

NXP has released 2 new inexpensive development boards. Both are much more accessible options for grad students and hobbyists as the XPC56xxMB2 starts at $375.

Having an actually ASIL certified chip to do development would really lower the barrier of entry for anyone that wanted to jump into AUTOSAR.

I would be more than willing to ship mine to developers (in the US) or figure out how to get them to you from local sources.

jlbirccyn commented 5 years ago

Hello,

We can get one from Farnell. However, we are lacking workforce to do a port on this platform. Would you be interested in contributing to the project by carrying out this port?

Best regard

dapperfu commented 5 years ago

I would love to contribute, but my backlog of other projects would probably upset my wife.

Are there any university students (anywhere in the world) that would like to do this as a capstone project? I don't have any connections to any universities but if anyone here does I would happily sponsor some students.

chatoune commented 5 years ago

Hello,

I have just bought two of those cards (DEVKIT-MPC5744P). I am available to port Trampoline on this platform. I do not where to start. I have the main.pdf documentation where chapters 15 and 16.2 might be useful.

Regards,

Eddy

jlbirccyn commented 5 years ago

Hello Eddy,

Good news ! The first thing to do is to run something on the board and to analyze the memory mapping and the startup code. Since this CPU supports only the VLE ISA, you will start by doing a copy of machines/ppc/mpc5643l and rename it to mcp5744p (startup code) and goil/templates/code/ppc/mpc5643l (templates to generate target specific code) and goil/templates/config/ppc/mpc5643l (basically the files to compile in machines/ppc/mpc5643l and interrupt sources). What compiler are you going to use ?

chatoune commented 5 years ago

Hello,

I will be using GCC. I am working with the IDE (S32 DS) from NXP. I have also added the latest SDK which includes drivers for the MPC5744P and also GCC (4.9.4).

jlbirccyn commented 5 years ago

Hello, So, in addition, in goil/templates/linker/gnu_ld/ppc/mpc5744p you will have to provide a link script template. It will be similar to the one in mpc5510 but with a different memory mapping. But I attach a link script template for the MPC5643L and GNU LD below

script.goilTemplate.zip

The template language has a documentation you'll find here : https://github.com/TrampolineRTOS/GTL/blob/master/documentation/GTL.pdf

Best regards

Feel free to ask if you have any question.

chatoune commented 5 years ago

Hi,

Thanks for your support. I have forked the project and I will update it tonight with all the modifications. I downloaded the complete documentation set for MPC5744P and MPC5643L. For the link script, NXP is providing examples for this platform. With the GTL doc I might be able to have a first version quickly.

Regards,

Eddy

dapperfu commented 5 years ago

@chatoune , let me know if you need extra testers.

chatoune commented 5 years ago

@jed-frey , thanks for your proposal. I had some work priorities for few weeks, now that I am available again I will rework my code (and write a complete porting documentation). I am still missing the linker script and then we could test it.

Regards,

Eddy

chatoune commented 5 years ago

Hi, just to give some news about the project. I am reviewing the scripts to verify I am not missing anything. I noticed boundaries which are not tested. In the root.goilTemplate, priority limits should be tested. If I choose 232 as priority then the result is over the limit of an UINT32 and there is no place for the ISRs.

jlbirccyn commented 5 years ago

Hello, In fact priorities are packed by the script so that there is no hole in priority levels. So even if you use 232 for a task priority and if this task is alone, its priority will be in fact 1 (0 being the priority of the idle task). However you are right, even if 232 tasks would be needed to overflow the priority levels and would overflow the RAM of any microcontroller, this should be checked.

mahmudsamiunlu commented 4 years ago

Hello, did you figure out MPC5744P GCC linker script for autosar mcal 4.0 ? Can you help me about linker script ?

quyleduc commented 2 years ago

Anyone have update for this topic?It's very interesting