Other Parts Discussed in Thread: HALCOGEN
I just downloaded HalCoGen.
I'm not sure what the version is, because in the start page it says "HalCoGen 2.11 - Released 10.October.2011" but in the
help-about it says "Version 2.10.00".
The example FreeRTOS project doesn't seem to build but I am hoping that this is just an issue of the help
being out of date. Is there a help for the RM48 port of FreeRTOS?
Here's some of the issues I run into:
I started a new project of type "RM48L950ZWT_FREERTOS"; but this has an empty 'main' and so it's not a ready to build demo.
I opened the HalCoGen Help and navigated to Help Topics -> Examples -> example_freeRTOSBlinky.c which seems like the
'demo' that all of the freertos docs talk about as a starting point for getting a freertos port up; however, this documentation says
it is for "TMS570LS20216SZWT". There are some significant differences in the configuration screens between what is shown
in the help and what is available in the RM48L950ZWT_FREERTOS halcogen configuration:
- many more drivers under the 'Driver Enable" tab.
- Cortex-R4F has an additional checkbox for enablin the FPU - not sure if FreeRTOS will work with FPU or not so don't
know how to set this.
- On the "Interrupts" tab, the IRQ handler name is different, it's pre-populated with vIsrStub not vPortIsrStub.
I changed to vPortIsrStub but have the feeling this might cause trouble down the line.
- Likewise, on the VIM RAM tab, the entry at address 0x0000000C was prepopulated with 'vPreemptiveTick' but the
instructions show 'vPortPreemptiveTick'.
- There are many more options under the OS tab general section ...
- The example code for 'sys_main.c' doesn't build. There are errors because it includes 'het.h' which seems to be not available for RM48.
Simply changing to 'nhet' to 'het' doesn't work, the include succeeds but the 'gioSetBit' and 'gioGetBit' function calls fail to compile.
----- Additional information:
- you have to change 'hetPORT' to 'nhetPORT1' in order for the three calls to 'gioXXXBit' to compile.
- next set of issues is linking. three unresolved symbols:
undefined first referenced
symbol in file
--------- ----------------
esmGroup1Notification ./sys_esm.obj
esmGroup2Notification ./sys_esm.obj
vPortPreemptiveTick ./sys_startup.obj
> It looks like the 'vPortPreemptiveTick' name change is causing a problem.
There's no option to disable esm drivers on the "Driver Enable" tab so it appears a pair of esm notification functions do need to be added to the example code.
--- A SECOND UPDATE ---
I had to switch to a TMS570LS HDK because of something unrelated to this thread, but was able to get the blinky demo running.
So thought I'd post the key files in case they can be of any use.
A few additional points of note:
1. to see anything blink on the TMS570LS HDK you have to
a) change the pin used for the LED. I used HET0 and this drives the white LED D5
b) change the time delay to something longer (otherwise it blinks too fast) I used 'vTaskDelay(1000)'.
2. with CCSv5.1 when you create a new project it seems to generate an empty 'main.c'.
this conflicts with the 'main()' function in HalCoGen's sys_main.c.
I just excluded sys_main.c from the ccs build to get around this.
I'm attaching the main.c that worked for this free RTOS example, as well as the halcogen .dil and .hcg files in case they can be of use until there's an update made.
Here are the files:
http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/0160.freertos7_5F00_proj1.hcg
http://e2e.ti.com/cfs-file.ashx/__key/CommunityServer-Discussions-Components-Files/312/4743.freertos7_5F00_proj1.dil