CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

5094 wont work with #ID

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

5094 wont work with #ID
PostPosted: Sun Jul 12, 2020 12:24 am     Reply with quote

I use the #ID checksum_program it work in 5066 but not in 5094.

Then i tested with the ex. file ex_checksum.c same problem won't compile.

*** Error 12 Line 38(0,1): Undefined identifier checksum_program

When looking in change list for the compiler i found:
5.074 A problem with #id and multiple compilation units is fixed.
Can the problem be so old? Working in 5066 and maybe broken from 5074?

Someone with a 5094 there can do a test on this?

(13062020, Accepted as a bug by CCS. Will be solved in next release.)


Last edited by hmmpic on Mon Jul 13, 2020 1:51 pm; edited 1 time in total
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Sun Jul 12, 2020 2:57 am     Reply with quote

Critical thing if we are to test. _WHAT CHIP_.....
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PostPosted: Sun Jul 12, 2020 5:42 am     Reply with quote

Sorry for that, i have tested with PIC12, PIC 16 and PIC18, with no luck.

Try the same as CCS use in the ex_checksum.c "18F4520"
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Sun Jul 12, 2020 7:04 am     Reply with quote

OK.
It builds OK with 5.090. So the issue is more recent. However it does not
complain on 5.093, on the line you refer to, but the line after.
It complains on the line:

#rom getenv("Program_memory")-1 = CHECKSUM

with 'memory not available at the requested location'.

If I change this to:

#rom int8 getenv("Program_memory")-2 = CHECKSUM

It then merrily builds OK.

I remember this coming up a little while ago. They changed the default
'size' that a #ROM declaration creates from an int8, to an int16 on the
PIC18 chips, and this causes an issue with trying to write a value to the
odd memory address here....
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PostPosted: Sun Jul 12, 2020 8:29 am     Reply with quote

Thanks. Then we know both 5093 & 5094 are buggy Laughing Confusing Rolling Eyes
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Sun Jul 12, 2020 10:33 am     Reply with quote

No, that was a compiler change, and documented. The only 'bug' is they
haven't updated the example for this change.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Mon Jul 13, 2020 11:02 pm     Reply with quote

Ttelmah wrote:

I remember this coming up a little while ago. They changed the default
'size' that a #ROM declaration creates from an int8, to an int16 on the
PIC18 chips, and this causes an issue with trying to write a value to the
odd memory address here....



Funky.

Why would they do that? Seems like it would break a lot of old code?
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Ttelmah



Joined: 11 Mar 2010
Posts: 19520

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 2:13 am     Reply with quote

The 'program memory', is implicitly a word aligned memory space, so really
has to be based on int16 entries.
As I show, you can still force memory to be allocated in int8 'lumps', but
it now defaults to word alignment.
Only something like this particular example, that tries to store an item on a
'odd' address will give any issue. I don't think any other code in their
examples does this.
It's been allocating in int16 sizes for quite a while. What they have done
is change the implicit alignment to match this.
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Tue Jul 14, 2020 8:56 am     Reply with quote

Ttelmah wrote:
The 'program memory', is implicitly a word aligned memory space, so really
has to be based on int16 entries.
As I show, you can still force memory to be allocated in int8 'lumps', but
it now defaults to word alignment.
Only something like this particular example, that tries to store an item on a
'odd' address will give any issue. I don't think any other code in their
examples does this.
It's been allocating in int16 sizes for quite a while. What they have done
is change the implicit alignment to match this.


Ahhh. Yea. That's true (the mem organization).

Ok - that makes perfect sense.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group