Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
19 years ago

Having Problem with uCOS and ISS with malloc

Hello,

Because NIOS doesnt have MMU, i prefered to use iss for testing and detecting memory leaks.

But in combination with uCOS, ISS fails on my system with the error

Error! : Failed memory access in component cpu - Reading data 0x0 from uninitial
ized memory (addr = 0x436822c)
Error! : Simulation failed in component cpu at instruction 2408130 (PC=0x405e0a4
 instr=0x10800017).

on start up, before i execute OSStart. There, I need to do some important initializations on power up, before OS starts.

The Memory access fails in OSTaskQuery, as i found out after hard search by the help of the elf symbol table. And this function gets called by __malloc_lock, which preserves thread savity to libc memory management, i guess.

So i figured out, that a use of malloc before OSStart, fails into a memory access error. I suppose, that this happend because OS dependend vars did not initalize yet.

Does anyony knows a possibility to avoid this behaviour?

Regards, Marek
No RepliesBe the first to reply