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 assembly files

Other Parts Discussed in Thread: HALCOGEN

Hello. I've been using HALcogen for a little while and I noticed that it generates a few .asm files (sys_core, intveccs, etc ...).

I've been trying to understand why it generate some methods in assembly so that they can be called later by c code, but I can't. There's simply A LOT of information to read and I haven't been able to find this exact information.

I want to know this because I want to write my own start up files and the entire code without the use of HALcogen. Can you tell me why I need to write this in assembly? Or even better could you tell me where I can get that information so that I can learn it on my own?

Thank you

  • Hi

    Most of the assembly sunctions supported in HALCoGen are for assessing the ARM core registers ( like initilization of registers, stack pointer register etc), accessing CP15 registers for using MPU or PMU.

    Following assemble are unavoidable but can be called from C - File.

    intvecs.asm -- Vector Table
    sys_MPU.asm -- Cortex R4 Mpu configurations which need CP15 access.
    sys_PMU.asm -- Cortex R4 pmu configurations which need CP15 access.
    sys_core.asm -- Core Init, Stack pointer Init, Swich CPU modes, Enable Vic port, Enable / disable ECC etc.

    "dabort.asm" generated by HALCogen is written to support safety Init ( to Handle intentional ECC error forcing which cause dabort etc), but user has the option to use his only abort handler by replacing "_dabort" to user defined function under "Interrupt" tab in HALCoGen.

    Please find the App note on Recommended Initializatio procedures http://www.ti.com/lit/an/spna163/spna163.pdf

    Regards
    Prathap

  • After your help I started studying the initialization of my microcontroller and started to understand why  it generates those files, since it's necessary for them to access the coprocessorand such .... I understand them and I think it's valid. I will even start writting those lines by myself so I can undestand the processor ina  better way.

    But in an example I found giving an example of a recommended boot it also created sys_memory.asm which I think it's really unnecessary since you can do everything written there in C and it won't affect performance that much. Or am I wrong? Wouldn't it be simples to write that piece of code in C and create .asm files for the embedded asm instructions in the c code? I'm just stating my preferences here.

    The example is the zip file included with the pdf for the initialization sequence