Dear SDCC users and developers, I'd like to use SDCC to compile some code 
for a PIC14 enhanced core device, (PIC16F1936) This mcu is supported by recent 
gputils, but apparently there is no support in sdcc.Because other similar 
device (with same cpu core) is supported: 12f1822, i decided to patch sdcc to 
support it. Now I have a problem, maybe not specific to the new mcu, but rather 
generic problem: I tried to define config in the source file but have no 
success. Pic14enh. devices has two config word at 0x8007 and 0x8008.I tried 
with the following ways: First try:unsigned short __at(_CONFIG1) config1Reg = 
(_FCMEN_OFF & _IESO_OFF & _BOREN_ON & _CPD_ON & _CP_ON & _MCLRE_OFF & _PWRTE_ON 
& _WDTE_OFF & _FOSC_HS);
// This compiles without error but results _no_ value at address 8007 in 
resulting hex file Second try:
__config __at(_CONFIG1) config1Reg = (_FCMEN_OFF & _IESO_OFF & _BOREN_ON & 
_CPD_ON & _CP_ON & _MCLRE_OFF & _PWRTE_ON & _WDTE_OFF & _FOSC_HS);
// This gives a compile time error: syntax error: token --> '__at' 
Third try:
// Trying to have both config1 and config2:
unsigned short __at(_CONFIG1) config1Reg = (_FCMEN_OFF & _IESO_OFF & _BOREN_ON 
& _CPD_ON & _CP_ON & _MCLRE_OFF & _PWRTE_ON & _WDTE_OFF & _FOSC_HS);
unsigned short __at(_CONFIG2) config2Reg = (_LVP_ON & _BORV_25 & _STVREN_ON & 
_PLLEN_ON & _WRT_ALL);
// Linker says: Multiple sections using address 0x8008
  So, I did not have success to specify config values.The resulting hex file 
never contains any values at 0x8007 and 0x8008. I browsed the sdcc doc, but did 
not found how to specify config for pic14enh devices.Could you please help? 
Best regards,Tamas
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to