I am using PIC18F4550 with MPBALX IDE V2.26, Xc8 V1.32.
1. Putting string in ROM/flash: I have lots of strings in my code. I want to put those in flash.
When I use this "rom" keyword, error appears, but if I remove this keyword there is no error. But it places string in data ram, which I dont want. What is solution.
Error:
Build successful:
2. On successful build, code gives some warning. What is corrupted fast interrupt shadow registers?
3. PIC18F4550 datasheet "DS39632E", gives all registers associated with peripheral on last page of that peripheral.
Timer0 on Page 131, Table 11-1, has list of register associated with it.
It also mention TRISA & its bits 0-6.
What is their use in it?
4. I have sizeof various datatypes in compiler. Sizeof float & double comes out to be 3 bytes? What does 3 byte means, it should be 4 bytes.
1. Putting string in ROM/flash: I have lots of strings in my code. I want to put those in flash.
When I use this "rom" keyword, error appears, but if I remove this keyword there is no error. But it places string in data ram, which I dont want. What is solution.
Error:
Code:
rom const char table[] = "fggx";
source/global.c:14: warning: (374) missing basic type; int assumed
source/global.c:14: error: (314) ";" expected
nbproject/Makefile-default.mk:158: recipe for target 'build/default/production/source/global.p1' failed
make[2]: Leaving directory 'D:/project/Project_51_ashokji/pic/codes/current_code/V6_lcd/njg.X'
(908) exit status = 1
make[2]: *** [build/default/production/source/global.p1] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'D:/project/Project_51_ashokji/pic/codes/current_code/V6_lcd/njg.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 508ms)
Build successful:
Code:
const char table[] = "fggx";
2. On successful build, code gives some warning. What is corrupted fast interrupt shadow registers?
Code:
:: advisory: (1233) Employing 18F4550 errata work-arounds:
:: advisory: (1234) * Corrupted fast interrupt shadow registers
:: warning: (1273) Omniscient Code Generation not available in Free mode
3. PIC18F4550 datasheet "DS39632E", gives all registers associated with peripheral on last page of that peripheral.
Timer0 on Page 131, Table 11-1, has list of register associated with it.
It also mention TRISA & its bits 0-6.
What is their use in it?
4. I have sizeof various datatypes in compiler. Sizeof float & double comes out to be 3 bytes? What does 3 byte means, it should be 4 bytes.