To view this discussion visit https://groups.google.com/d/msgid/jallist/AM0PR02MB405215BDEA0ED16B99B7A74CE69DA%40AM0PR02MB4052.eurprd02.prod.outlook.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/AM0PR02MB4052681EEC0AF3F268BA724FE69DA%40AM0PR02MB4052.eurprd02.prod.outlook.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/AM0PR02MB4052681EEC0AF3F268BA724FE69DA%40AM0PR02MB4052.eurprd02.prod.outlook.com.
Hi David,
If we would like to add a pragma HEF, the start address of HEF must be in the device file. The device files are generated via a Python script that uses the XML description of the PIC from Microchip. Since HEF was never checked you will also not find it in the device file.
I had a short look at the PIC16F1455 which has HEF that goes from address 0x1F80 - 0x1FFF and I checked the XML file from Microchip but I could only find the total Program space including the HEF space but not a separate HEF address. It looks like this:
<edc:CodeSector edc:beginaddr="0x0" edc:endaddr="0x800" edc:issection="true" edc:regionid="page0" edc:sectiondesc="ROM code space - page0" edc:sectionname="PROG0"/><edc:CodeSector edc:beginaddr="0x800" edc:endaddr="0x1000" edc:issection="true" edc:regionid="page1" edc:sectiondesc="ROM code space - page1" edc:sectionname="PROG1"/><edc:CodeSector edc:beginaddr="0x1000" edc:endaddr="0x1800" edc:issection="true" edc:regionid="page2" edc:sectiondesc="ROM code space - page2" edc:sectionname="PROG2"/><edc:CodeSector edc:beginaddr="0x1800" edc:endaddr="0x2000" edc:issection="true" edc:regionid="page3" edc:sectiondesc="ROM code space - page3" edc:sectionname="PROG3"/>
So the total ROM space is devided over PROG0 --- PROG3 from 0x0000 to 0x1FFF (end address 0x2000) but no special space for HEF. I am not sure if there is something else mentioned in this XML file indicates anything which is HEF related but I could not find it. If not, it is not possible to generate a device file with the HEF address and so would the compiler not be able to generated some hex information using a pragma hef.
If you in the xml file of a PIC that has EEPROM, you see this:
<edc:EEDataSector edc:beginaddr="0xF000" edc:endaddr="0xF100" edc:issection="true" edc:regionid="eedata" edc:sectiondesc="Data EEPROM" edc:sectionname="DEEPROM"/>
So here we can retrieve the start address and an end address of the EEPROM.
Kind regards,
Rob
Van: Pinhead <pinhe...@gmail.com>
Verzonden: dinsdag 3 februari 2026 15:09
Aan: Rob CJ <rob...@hotmail.com>
Onderwerp: Re: [jallist] HEF and pragma EEDATA
Hi,
About the adress, it's not a problem: in my application, I will use the first 4 bytes (2 words) as parameters set during runtime. That's why my array of data only starts at 0x0F84.
I had a look in the device file for a pic with classic EEPROM, and there is a pragma eeprom in it, but not for pic's with HEF.
In the meantime, I found an asm example of how to initialize the hef in the source code ( https://www.microcontroller.it/english/Tutorials/PIC/HEF.htm ) :
; HEF memory preload
#ifdef __16F1508
HEFDATA CODE 0F80h
#endif
#ifdef __16F1509
HEFDATA CODE 1F80h
#endif
#ifdef __16F1507
HEFDATA CODE 0780h
#endif
DA 60h, 0, 99h, 9, 40h, 03h, 0, 0 ;8 bytes
DA "MICROCONTROLLER.IT@ 2015" ;24 bytes - tot 32 bytes
The "CODE" directive specifies the start adress of the HEFDATA, depending of the pic used.
The DA directive is then used to initialize the data starting at that adress.
Is there any way to do the same in jal ?
(Equivalent to tell the compiler to "Put the following data DA starting at the CODE adress".
The result is that that data will be initialized during programming time and will not take up any space neither in RAM nor in program memory.
Le 02-02-26 à 19:20, Rob CJ a écrit :
You received this message because you are subscribed to a topic in the Google Groups "jallist" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jallist/6_c4hoodm_U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jallist+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/jallist/AM0PR02MB4052B8C57BF0EA046A7DEA83E69AA%40AM0PR02MB4052.eurprd02.prod.outlook.com.