error when using 'USER_EXIT_CRITICAL

Discussion to talk about software related topics only.
Post Reply
Lachlanp
Posts: 91
Joined: Tue Jan 29, 2013 4:44 am

error when using 'USER_EXIT_CRITICAL

Post by Lachlanp »

I am using the function USER_ENTER_CRITICAL and USER_EXIT_CRITICAL and including the library <ucosmcfc.h>.

When using USER_EXIT_CRITICAL I get the errors
error: 'OSISRLevel' undeclared
error: memory input 0 is not directly addressable

I have used these functions without any problem in other project.
Has anyone come across this problem and explain why the problem occurs and how to fix it ?

Thanks
Lachlan
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: error when using 'USER_EXIT_CRITICAL

Post by dciliske »

This is strange... Can you post the complete compiler output? I know I've run across this before, with it being a kind of stupid thing, but I can't remember what the circumstances were.

-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Lachlanp
Posts: 91
Joined: Tue Jan 29, 2013 4:44 am

Re: error when using 'USER_EXIT_CRITICAL

Post by Lachlanp »

I am not sure how much of the complier code you require but here is the last bit that gives the problem:

-IC:\Users\Lachlan\Documents\Netburner Studio\Eve3\uCProbe -IC:\Users\Lachlan\Documents\Netburner Studio\Eve3 -IC:\Users\Lachlan\Documents\Netburner Studio\Eve3\utility -IC:\Users\Lachlan\Documents\Netburner Studio\Eve3\connectEVE -IC:\nburn/NANO54415/include -IC:\nburn/gcc-m68k/m68k-elf/include -IC:\Users\Lachlan\Documents\Netburner Studio\Eve3 -gdwarf-2 -Wall -Wno-write-strings -c -fmessage-length=0 -mcpu=5206e -DNANO54415 -DMCF5441X -o uCProbe\probe_com.o ..\uCProbe\probe_com.c
..\uCProbe\probe_com.c: In function 'ProbeCom_TerminalOut':
..\uCProbe\probe_com.c:558: error: 'OSISRLevel' undeclared (first use in this function)
..\uCProbe\probe_com.c:558: error: (Each undeclared identifier is reported only once
..\uCProbe\probe_com.c:558: error: for each function it appears in.)
..\uCProbe\probe_com.c:558: error: memory input 0 is not directly addressable
Build error occurred, build is stopped
Time consumed: 3477 ms.


I am using uC-Probe software and I have changed the CPU_ENTER_CRITICAL that is in the default code, with USER_ENTER_CRITICAL.

Regards
Lachlan
User avatar
dciliske
Posts: 624
Joined: Mon Feb 06, 2012 9:37 am
Location: San Diego, CA
Contact:

Re: error when using 'USER_EXIT_CRITICAL

Post by dciliske »

Does 'probe_com.c' include 'ucos.h'? Because that's where OSISRLevel is defined...
Dan Ciliske
Project Engineer
Netburner, Inc
Lachlanp
Posts: 91
Joined: Tue Jan 29, 2013 4:44 am

Re: error when using 'USER_EXIT_CRITICAL

Post by Lachlanp »

I have to include <ucosmcfc.h> instead of <ucos.h>. When I include only <ucos.h> I get the compiler error 'undefined reference to 'USER_EXIT_CRITICAL' etc.
Post Reply