Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

Having Problem with uCOS and ISS with malloc

Altera_Forum
Honored Contributor II
1,142 Views

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
0 Kudos
0 Replies
Reply