View previous topic :: View next topic |
Author |
Message |
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
5094 wont work with #ID |
Posted: Sun Jul 12, 2020 12:24 am |
|
|
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: 19522
|
|
Posted: Sun Jul 12, 2020 2:57 am |
|
|
Critical thing if we are to test. _WHAT CHIP_..... |
|
|
hmmpic
Joined: 09 Mar 2010 Posts: 314 Location: Denmark
|
|
Posted: Sun Jul 12, 2020 5:42 am |
|
|
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: 19522
|
|
Posted: Sun Jul 12, 2020 7:04 am |
|
|
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
|
|
Posted: Sun Jul 12, 2020 8:29 am |
|
|
Thanks. Then we know both 5093 & 5094 are buggy Confusing |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19522
|
|
Posted: Sun Jul 12, 2020 10:33 am |
|
|
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
|
|
Posted: Mon Jul 13, 2020 11:02 pm |
|
|
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: 19522
|
|
Posted: Tue Jul 14, 2020 2:13 am |
|
|
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
|
|
Posted: Tue Jul 14, 2020 8:56 am |
|
|
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 |
|
|
|