Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2024, 09:40:16 09:40


Login with username, password and session length


Pages: 1 ... 5 6 7 8 9 10 11 [12]
Print
Author Topic: XC8 Compilers - Discussion  (Read 236923 times)
0 Members and 2 Guests are viewing this topic.
Manuel
Senior Member
****
Offline Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 46

Thank You
-Given: 49
-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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 46

Thank You
-Given: 49
-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.

Code:

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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 51

Thank You
-Given: 11
-Receive: 49


« 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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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
****
Online Online

Posts: 261

Thank You
-Given: 474
-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 Offline

Posts: 329

Thank You
-Given: 678
-Receive: 192


« 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 Offline

Posts: 51

Thank You
-Given: 11
-Receive: 49


« 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 Offline

Posts: 860

Thank You
-Given: 3086
-Receive: 4596


« 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 Offline

Posts: 321

Thank You
-Given: 1659
-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.
Pages: 1 ... 5 6 7 8 9 10 11 [12]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC