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.

Compiler Error with Example "example_freeRTOSBlinky.c"

Other Parts Discussed in Thread: HALCOGEN

Dear Supporter,

i started to use your toolchain (HALCoGen, CCS) with microcontroller TMS570LS20216SZWT and USB connection Kit XDS 100v2 and i found some problems compiling the example of HALCoGen v. 03.04.00 "example_freeRTOSBlinky.c". The problem is a linking problem and more detailed your tool dosn't generate the "_isrStub". In the file "sys_intvecs.asm" i have this generated code:

;-------------------------------------------------------------------------------
; interrupt vectors

            b _c_int00
undefEntry
           b undefEntry
           b vPortYieldProcessor
prefetchEntry
           b prefetchEntry
dataEntry
          b dataEntry
reservedEntry
          b reservedEntry
         b _isrStub
        ldr pc,[pc,#-0x1b0]


I think that HALCoGen dosn't generate in the file "os_portasm.asm" the asm function "_isrStub". Could you help me please to solve this issue?Is it possible to have a correct example with some task managed by FreeRTOS?

Many thanks in advance.

Ciro Martera

  • Hi Ciro,

    We encourage users to use the "Enable IRQ Handling via VIC controller " since vector mode using VIC is much faster than the conventional Dispatch mode.
    In HALCogen enable following check boxes.

    If user still want to use the legacy dispatch mode, user can write his own dispatch routine ( _isrStub ) is editable in Interrupt tab. Chage it to the user defined dispatch routine..
    Bare minimal Dispatch routine would be like

    ;-------------------------------------------------------------------------------
    ; isr stub

             .def _isrStub
               .asmfunc

    _isrStub
                portSAVE_CONTEXT ; Use this line only in Free RTOS port
                ldr     r0, isrVector
                ldr     r0, [r0]
                blx     r0
                portRESTORE_CONTEXT  ; Use this line only in Free RTOS port
    isrVector   .word   0xFFFFFE70

            .endasmfunc
    ;-------------------------------------------------------------------------------

    One of other query which I responded has the freeRTOS blink complete project. http://e2e.ti.com/support/microcontrollers/hercules/f/312/p/251271/879929.aspx#879929

    Regards
    Prathap

  • Hi Prathap,

    thank you very much for your suggestion. I downloaded the new versione of HALCoGen v.03.05.00, and now it seems works but with some changes:

    1) in VIM RAM --> in the location 0x00000C it should be vPortPreemptiveTick instead of vPreemptiveTick

    2) in INTERRUPTS --> the SVC should be vPortSWI instead of vPreemptiveTick; the  IRQ Dispatch Mode should not be "_isrStub"

    Thank you very much for your support

    Ciro