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.

HALCOGEN: HalCoGen generates sys_pmu.asm with missing asm instructions for TMS5701227

Expert 2025 points
Part Number: HALCOGEN

HalCogen generates /provides automatically its HAL layer and, for odd reason it generated me buggy / missing asm for 1227 only, and not for 0714 or 0914. 
(Just retested by deleting this asm file, and generating again)

This is for the set/ get event counters.  What it generated for 1227 is :

;-------------------------------------------------------------------------------
; Set Count event
; SourceId : PMU_SourceId_009
; DesignId : PMU_DesignId_009
; Requirements : HL_SR485

    .def     _pmuSetCountEvent_
    .asmfunc

_pmuSetCountEvent_

        mcr   p15, #0, r0, c9, c12, #5 ; select counter
        mcr   p15, #0, r1, c9, c13, #1 ; select event
        bx    lr

    .endasmfunc

;-------------------------------------------------------------------------------
; Get Event Counter Count Value
; SourceId : PMU_SourceId_011
; DesignId : PMU_DesignId_011
; Requirements : HL_SR486

    .def     _pmuGetEventCount_
    .asmfunc

_pmuGetEventCount_

        mcr   p15, #0, r0, c9, c12, #5 ; select counter
        mrc   p15, #0, r0, c9, c13, #2 ; read event counter
        bx    lr

This kinda has off-by-one on the event counter selection,  it' missing

 lsr r0, r0, #1

as the first line for those calls.  And,  oddly , it does insert it for 0714 & 0914 code... Don't know whats up with my 1227 config

.tms570_ls1227_zwt_.tar