Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #275 on: March 02, 2024, 10:13:28 10:13 » |
|
I Just checked the PICC side to be honest.
Can you share the "corrupted" file to ... check ?
or share the project so that can try same checking...
take care
X!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
jaikumar
Junior Member

Offline
Posts: 46
Thank You
-Given: 50
-Receive: 18
|
 |
« Reply #276 on: March 04, 2024, 05:29:55 05:29 » |
|
Hi,
I have attached the AVR ATTiny412 project. The source file is simple generated file.
|
|
|
Logged
|
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #277 on: March 04, 2024, 10:02:41 10:02 » |
|
It get compiled with just one warning on Xide 6.20.
There should be some issue on your side i think.
take care, X!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
jaikumar
Junior Member

Offline
Posts: 46
Thank You
-Given: 50
-Receive: 18
|
 |
« Reply #278 on: March 05, 2024, 05:06:07 05:06 » |
|
Hi, I installed version 6.20 MPLABX. Getting this error below: Keep getting note: Please reinstall the compiler Could it be because files are not patched properly. Could you please reply with steps required to patch properly. make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf make -f nbproject/Makefile-default.mk dist/default/production/MPLABXProjects.production.hex make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/main.o.d" -MT "build/default/production/main.o.d" -MT build/default/production/main.o -o build/default/production/main.o main.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' main.c:1:0: warning: Detected corrupt executable file /* ^ main.c:1:0: note: Please reinstall the compiler main.c:1:0: warning: Detected corrupt executable file main.c:1:0: note: Please reinstall the compiler main.c: In function 'main': main.c:42:5: error: 'sdfsf' undeclared (first use in this function) sdfsf ^ main.c:42:5: note: each undeclared identifier is reported only once for each function it appears in main.c:44:5: error: expected ';' before 'while' while(1) ^ make[2]: *** [nbproject/Makefile-default.mk:162: build/default/production/main.o] Error 1 make[2]: *** Waiting for unfinished jobs.... mcc_generated_files/system/src/protected_io.S:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/protected_io.S:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/protected_io.S:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/protected_io.S:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/config_bits.c:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/config_bits.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/config_bits.c:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/config_bits.c:1:0: note: Please reinstall the compiler make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -c -mcpu=ATtiny412 -x assembler-with-cpp -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -Wa,--defsym=__MPLAB_BUILD=1 -MD -MP -MF "build/default/production/mcc_generated_files/system/src/protected_io.o.d" -MT "build/default/production/mcc_generated_files/system/src/protected_io.o.d" -MT build/default/production/mcc_generated_files/system/src/protected_io.o -o build/default/production/mcc_generated_files/system/src/protected_io.o mcc_generated_files/system/src/protected_io.S make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/mcc_generated_files/system/src/config_bits.o.d" -MT "build/default/production/mcc_generated_files/system/src/config_bits.o.d" -MT build/default/production/mcc_generated_files/system/src/config_bits.o -o build/default/production/mcc_generated_files/system/src/config_bits.o mcc_generated_files/system/src/config_bits.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' mcc_generated_files/system/src/system.c:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/system.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/system.c:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/system.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/clock.c:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/clock.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/clock.c:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/clock.c:1:0: note: Please reinstall the compiler make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/mcc_generated_files/system/src/system.o.d" -MT "build/default/production/mcc_generated_files/system/src/system.o.d" -MT build/default/production/mcc_generated_files/system/src/system.o -o build/default/production/mcc_generated_files/system/src/system.o mcc_generated_files/system/src/system.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/mcc_generated_files/system/src/clock.o.d" -MT "build/default/production/mcc_generated_files/system/src/clock.o.d" -MT build/default/production/mcc_generated_files/system/src/clock.o -o build/default/production/mcc_generated_files/system/src/clock.o mcc_generated_files/system/src/clock.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' mcc_generated_files/system/src/interrupt.c:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/interrupt.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/interrupt.c:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/interrupt.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/pins.c:1:0: warning: Detected corrupt executable file /** ^ mcc_generated_files/system/src/pins.c:1:0: note: Please reinstall the compiler mcc_generated_files/system/src/pins.c:1:0: warning: Detected corrupt executable file mcc_generated_files/system/src/pins.c:1:0: note: Please reinstall the compiler make[1]: *** [nbproject/Makefile-default.mk:85: .build-conf] Error 2 make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2 "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/mcc_generated_files/system/src/interrupt.o.d" -MT "build/default/production/mcc_generated_files/system/src/interrupt.o.d" -MT build/default/production/mcc_generated_files/system/src/interrupt.o -o build/default/production/mcc_generated_files/system/src/interrupt.o mcc_generated_files/system/src/interrupt.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects' make[2]: Entering directory 'C:/Users/jaikumar/MPLABXProjects' "H:\Microchip\MPLABX\v6.15\xc8\v2.46\bin\xc8-cc.exe" -mcpu=ATtiny412 -c -x c -D__ATtiny412__ -mdfp="D:/Microchip/MPLABX/v6.20/packs/Microchip/ATtiny_DFP/3.1.260/xc8" -Wl,--gc-sections -O1 -ffunction-sections -fdata-sections -fshort-enums -fno-common -funsigned-char -funsigned-bitfields -Wall -DXPRJ_default=default -gdwarf-3 -mno-const-data-in-progmem -MD -MP -MF "build/default/production/mcc_generated_files/system/src/pins.o.d" -MT "build/default/production/mcc_generated_files/system/src/pins.o.d" -MT build/default/production/mcc_generated_files/system/src/pins.o -o build/default/production/mcc_generated_files/system/src/pins.o mcc_generated_files/system/src/pins.c make[2]: Leaving directory 'C:/Users/jaikumar/MPLABXProjects'
BUILD FAILED (exit value 2, total time: 2s)
|
|
|
Logged
|
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #279 on: March 05, 2024, 07:58:46 07:58 » |
|
Check Reply #141.
.... "the renamed file can stay in the same directly" before apply the "final solution".
take care, X!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #280 on: July 09, 2024, 04:09:28 16:09 » |
|
Functional safety v2.49 released.
Xo!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
patchjack
Junior Member

Offline
Posts: 54
Thank You
-Given: 11
-Receive: 54
|
 |
« Reply #281 on: July 10, 2024, 07:28:02 07:28 » |
|
Functional safety v2.49 released.
Xo!
Has patch method?
|
|
|
Logged
|
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #282 on: July 10, 2024, 11:16:40 11:16 » |
|
The TOP is perfecly working...
X!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #283 on: August 26, 2024, 11:11:16 11:11 » |
|
Updated to v2.50.
Xo!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
Mr. Spock
Senior Member
  
Offline
Posts: 261
Thank You
-Given: 475
-Receive: 827
|
 |
« Reply #284 on: August 28, 2024, 03:08:27 15:08 » |
|
Just wondering why people still use PIC 8 bits when you can get an ARM Cortex-M0 PY32F002A (SSOP20) from PUYA for US$0.075
|
|
|
Logged
|
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #285 on: August 28, 2024, 03:51:59 15:51 » |
|
I understand your point of view, but consider that many application just accept industrial level product.
Anyhow, the PY32L020 is quite nice, but missing some peripheral.
take care, X!
|
|
« Last Edit: August 28, 2024, 04:14:23 16:14 by Manuel »
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
patchjack
Junior Member

Offline
Posts: 54
Thank You
-Given: 11
-Receive: 54
|
 |
« Reply #286 on: August 31, 2024, 04:53:21 04:53 » |
|
I Request XC8 Functional Safety Compiler Evaluation License. For a 15-day evaluation license. Add this license to the License path folder C:\ProgramData\Microchip\xclm\license. 2.46 and 2.49 generate exactly the same object code. 2.49 is Functional Safety Compiler. 2.50 is the latest version. The generated object code is different from the first two. The generated object code is smaller. I no longer pursue the feature safety version. Because it just has one more functional safety certificate. Attached is a detailed comparison.
|
|
|
Logged
|
|
|
|
mitsos
Hero Member
   
Offline
Posts: 867
Thank You
-Given: 3155
-Receive: 4778
|
 |
« Reply #287 on: August 31, 2024, 03:54:52 15:54 » |
|
hi
in the last version of Proteus, 8.17SP4, I open the sample project: DHT22 Low Cost Humidity Sensor & PIC18 and I try the last xc8 compiler 2.50 in various optimization levels by applying the Top patch or the xclm-hack.exe or the XC8Fs.lic from the last post of patchjack.
To make Proteus consistent with the xc8.exe optimization options, I modified the xc8.xml (C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\VSM Studio\compilers\xc8.xml) from this: <OPTION NAME="--opt=" DESC="Optimization options" PARAM="CHOICE"> <PARAM VALUE="1" DESC="Level 1"/> <PARAM VALUE="2" DESC="Level 2"/> <PARAM VALUE="3" DESC="Level 3"/> <PARAM VALUE="4" DESC="Level 4"/> <PARAM VALUE="5" DESC="Level 5"/> <PARAM VALUE="6" DESC="Level 6"/> <PARAM VALUE="7" DESC="Level 7"/> <PARAM VALUE="8" DESC="Level 8"/> <PARAM VALUE="9" DESC="Level 9"/> <PARAM VALUE="asm" DESC="Optimize asm code generated from C"/> <PARAM VALUE="asmfile" DESC="Optimize assembler files"/> <PARAM VALUE="speed" DESC="Favor code generation for speed over space"/> <PARAM VALUE="space" DESC="Favor code generation for space over speed"/> <PARAM VALUE="all" DESC="All"/> <PARAM VALUE="none" DESC="None"/> <PARAM VALUE="default" DESC="Default" DEFAULT="1"/> </OPTION>
to this: <OPTION NAME="--opt=" DESC="Optimization options" PARAM="CHOICE"> <PARAM VALUE="1" DESC="Level 1"/> <PARAM VALUE="2" DESC="Level 2"/> <PARAM VALUE="3" DESC="speed over space PRO"/> <PARAM VALUE="local" DESC="Localized optimizations"/> <PARAM VALUE="asmfile" DESC="Optimize assembler files"/> <PARAM VALUE="g" DESC="Favor code accurate debug"/> <PARAM VALUE="s" DESC="space over speed PRO"/> <PARAM VALUE="all" DESC="All the above"/> <PARAM VALUE="none" DESC="None of the above"/> <PARAM VALUE="default" DESC="Default" DEFAULT="2"/> </OPTION>
Each time, I changed the optimization parameter only in the linker (LD) tool, since I had first added the --opt option. In the compiler (CC) and assembler (ASM) tool you don't need to add the --opt option.
I got the following results:
with the xclm-hack.exe & Top patch none: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%)
1: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) 2: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) 3: Program space used 722h ( 1826) of 8000h bytes ( 5.6%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) g: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) s: Program space used 6D2h ( 1746) of 8000h bytes ( 5.3%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) local: Program space used B10h ( 2832) of 8000h bytes ( 8.6%) Data space used 5Dh ( 93) of 600h bytes ( 6.1%) asmfile: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) all: Program space used 858h ( 2136) of 8000h bytes ( 6.5%) Data space used 5Dh ( 93) of 600h bytes ( 6.1%) with XC8Fs.lic none: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%)
1: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) 2: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) 3: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) g: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) s: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) local: Program space used B10h ( 2832) of 8000h bytes ( 8.6%) Data space used 5Dh ( 93) of 600h bytes ( 6.1%) asmfile: Program space used 978h ( 2424) of 8000h bytes ( 7.4%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%) all: Program space used 7A6h ( 1958) of 8000h bytes ( 6.0%) Data space used 5Ah ( 90) of 600h bytes ( 5.9%)
regards mitsos
|
|
« Last Edit: August 31, 2024, 06:08:23 18:08 by mitsos »
|
Logged
|
|
|
|
max
Senior Member
  
Offline
Posts: 322
Thank You
-Given: 1709
-Receive: 52
|
 |
« Reply #288 on: November 10, 2024, 05:54:41 05:54 » |
|
Hi, Does someone know the XC8 pic tutorial using the compiler in command line mode without using the mplab ide.
|
|
|
Logged
|
Fate arrived and made the conscious unconscious It silenced the activity of life.
|
|
|
patchjack
Junior Member

Offline
Posts: 54
Thank You
-Given: 11
-Receive: 54
|
 |
« Reply #289 on: December 21, 2024, 08:04:11 08:04 » |
|
V3.00 is coming. Patch OK!
|
|
|
Logged
|
|
|
|
simyaci
Newbie
Offline
Posts: 18
Thank You
-Given: 240
-Receive: 31
|
 |
« Reply #290 on: December 21, 2024, 06:45:04 18:45 » |
|
Hi, Does someone know the XC8 pic tutorial using the compiler in command line mode without using the mplab ide.
You can write code for XC8 and many other compilers in Proteus PDS. 
|
|
|
Logged
|
|
|
|
Manuel
Senior Member
  
Offline
Posts: 336
Thank You
-Given: 703
-Receive: 194
|
 |
« Reply #291 on: December 23, 2024, 09:11:32 09:11 » |
|
Found Oddities in compiler xc v3.00 that can not make me consider a possible tool migration in future:
1) non conformity in comment management, so /* is ok but // create issues in macro.
--> type of error: error: invalid token at start of a preprocessor expression
2) something like :
--> const unsigned char settings_0[] @ FLASH_ROW_ADDRESS = {...... ^ create an error :
--> error: expected ';' after top level declarator
3) FORCED Moved from 24bit to 32bit management in LINKER MEMORY about size of DOUBLE and FLOAT.
this is terribly oddy because dimension of the compiled grow terribly..... can not manage such system in a controller with 1 or 2 K....
NOTE: ALL THE 3 POINTs works correctly in all previous compiler versions....
Crazy.
X!
|
|
|
Logged
|
-> An Apple a Day does not Let U become a Macintosh!
|
|
|
giappolo
Active Member
 
Offline
Posts: 149
Thank You
-Given: 1710
-Receive: 620
|
 |
« Reply #292 on: January 20, 2025, 06:08:26 18:08 » |
|
If you have problem to patch xc8, read this
There is no need, just do the following and it should work OK: befor you start, go to project options menu XC8 compiler, set drop down menu to Optimization.
set menu Optimization leve to >> s <<
when you compile you should see messages that say : max optimization is level 2 from MPLAB advisor or somethink like that. ============================================ how to set max level mode optimizations: DO IT RIGHT LIKE HERE !!!! open cmd in admin mode.
open file explorer and make file view extensions in settings of file explorer to see file extensions.
rename in file explorer original xclm.exe into xclm.old inside in folder "C:\Program Files\Microchip\xc8\v2.35\bin".
Copy cracked xclm.exe to "C:\Program Files\Microchip\xc8\v2.35\bin".
Copy second time same cracked files xclm.exe and xclm.old in to one folder back from /bin folder >> two files second copy and past xclm.exe and xclm.old in to "C:\Program Files\Microchip\xc8\v2.35"
Open a cmd as ADMIN !!!! important !!! in this location: "C:\Program Files\Microchip\xc8\v2.35", and run xclm.exe
wait to extract the files.
start mplab and go to project options menu XC8 compiler, set drop down menu to Optimization.
set menu Optimization leve to >> s <<
hit Apply and OK.
when you compiling project is finish need to NOT get messages from MPLAB advisor for level of optimization. that mean you make it right update to max optimizations. IF your project is compiled ok, BUT you still have message for max level optimization = level 2 or any wrong message = red letters, need to reinstall XC8_v2.35 and do it again
if you do not want some variables and or other data in your code to NOT BE OPTIMIZED use infront ot variable this word >>> volatile infront of unsigned char or other code where is not wrong. example >>
volatile unsigned char temp = 20; volatile unsigned int speed = 1200; volatile unsigned double max_turn = 12000;
that's it.
|
|
|
Logged
|
|
|
|
|