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.

Apply Autosar

Other Parts Discussed in Thread: HALCOGEN

Hi everyone, I am doing an academy project about porting Autosar OS to TMS570. After reading papers and information about Autosar, Arctic Core and Arctic Studio, I have some questions:
1. I used to port FreeRTOS to TMS570 and it's very easy, I just included some *.h and *.c files of FreeRTOS, and then used the FreeRTOS functions to build my application on the chip. Can I do similarly to Autosar? If it is possible, which files should I include to my main.c
2. Second question, in FreeRTOS, I only need to use xcreatetask() function(this is a FreeRTOS function) to set task priority, and then i applied vstarttaskschedule() function to run the task in queue however I cannot see these kinds of functions in Autosar OS. Can someone tell me which function in autosar have same functionality like functions I said.
3. When I program Texas Instrument chips( TMS570 also), there is always main function which include the main program that we will build for the chip. However, I don't see any main functions in arctic Core example. How can the chips (TMS570, ...) runs our program without main function?
Please help me answer these questions!

  • Hi Dzung,

    I don't think anyone on our team has worked with Artic Core - you may need to go to their support forum to get help with questions like these which are really heavily tied to their implementation of the OS.

    I do notice that they have a /boards/ti_tms570ls folder in their artic-stable repository, and they have a forum to posts questions on - so I'd start there if I were you. If it comes back to something related to CCS, HalCoGen ( a specific question) or the chip itself then we can try to help you with those things here.
  • Hi Anthony, Can CCS compile .oil file since in autosar OS we need to set task configuration in this file(task 's priority ...) and .oil files is not used as C programming syntax?
  • Hello Dzung,

    There needs to be some distinction made between the Autosar implementation you are referring to as Arctic Core and what Autosar truly is. Autosar is an automotive based HW abstraction standard. Being that it is a standard and not a code set, anyone can write an Autosar compliant set of drivers for the their MCU. We have several third part tools that support our devices with Autosar compliant drivers if you pay the licensing fees.

    This is similar to many RTOS implementations. You mentioned FreeRTOS which is made be the same company that makes SafeRTOS, and there are many other RTOS's such as Micrium, TI-RTOS, etc. The key is that the RTOS code set has to natively support the uController you are porting to. There are RTOS's that do support hercules and are fairly simple to use and there are RTOS's that do not natively support Hercules that would be very difficult to port to our devices.

    I think the Arctic Core Autosar implementation will be very difficult to support because it is not natively setup to work with Hercules and not necessarily supported by our tools (.oil file won't be recognized by CCS from what I understand). In addition, because there is not a knowledge base within the support group, it will be very difficult to get support for your implementation/port.

    As Anthony pointed out, I don't want to discourage you from trying, but you may need to work more closely with the Arctic Core support team instead of the Hercules support team with regard to the software. If there are questions directly related to the Hercules HW/architecture, we would be more than happy to assist.
  • Hi Anthony and Chuck, thank for your replies. Now I try to write RTOS by my self.
    I have a question: in RTOS concept, we have "context switch" theory. From what I know, context switch is to describe that when some task is running and the other task has a higher priority, the higher priority task will run and the current task will be saved its state and continue to start after the higher task finish. To do this concept, I think the higher priority task will run in the interrupt functions since the interrupt functions have higher priority than other instruction, am I right?. If i am right, so i do not need to write code to save the current task's state, since as i know that after interrupt, the program will return to where it is interrupted. If I am wrong, how can I save the current task 's state? Is it necessary to write assembly code to do that since I see halogen generate an assembly code file to do this for FreeRTOS?

    Besides, which third part tools support TMS570 devices with Autosar compliant drivers? Can you share me the links and how much do i have to pay?

  • Hello Dzung,

    Although I understand the challenges you must face in authoring an RTOS, I believe this is beyond the scope of this forum. I think you may get more useful inputs from a more general forum on software design and RTOS concepts. We are experts on the hardware and can offer advice on how to solve problems and apply concepts with the Hercules devices and not necessarily RTOS design experts.

    With that said, your thoughts on using interrupts for the higher priority tasks seems reasonable but this is also dependent on the type task that is to be performed and whether or not there is an interrupt that can be used to kick off those tasks (possibly the RTI interrupts in Hercules?). In regard to assembly or a higher level language for the ISR's, I think it should be possible to write in the higher level languages for the ISR's but this is dependent on several factors including but not limited to latency and task complexity.

    FYI, doing a simple search for "rtos design issues principles and case study" using google turned up quite a bit of information on RTOS design principles and information.