Quantcast
Channel: MPLAB XC16
Browsing all 1508 articles
Browse latest View live
↧

Project is using a large data memory model (WeHongKongers)

Hello,I am compiling a PIC24F MCU project and XC16 keeps showing this warning. How do I correct it or improve?Thanks for your opinions.My platform is XC16 v1.5; MPLAB X v5.35.Info: Project is using a...

View Article


Microchip AGC library (Too Old For This)

Please let me know if this is in the wrong bit of the forum. Microchip's AGC library for the dsPIC33 series. Basically, I've built a ton of stuff round it, including a serial interface so I can look at...

View Article


Problem migrating and fitting code from C30. Is XC16 not as good? (user2x)

I am migrating an application for PIC24FJ256DA210.On the C30, it was at 99% code space with optimization = s. I now have a license for XC16 v1.70 and I am recompiling this code.It will not fit!! I have...

View Article

warning: Negative offset for 'variable' (Szidor)

Hi! What does the warning "Negative offset for 'variable'" mean? "variable" is the name of a global static data variable. Thanks,Szidor..

View Article

dsPIC33CH128MP508 missing definition in .h file (john.dammeyer)

The p33CH128MP508.h file supplied with XC16 V1.70 for the QEI module has:#define POS1HLD POS1HLDextern volatile uint16_t POS1HLD __attribute__((__sfr__));as a 16 bit register but the data sheet...

View Article


Program execution stops for no reason (nrbmPhil)

Hello,I'm not sure if this is the right place for such a post, but I think this kind of issue is more related to the compiler... I have an issue where the program stops executing at a specific location...

View Article

XC16 v2.00 Released (mpgmike)

I periodically check, and today I found a new XC16 version 2.00 (dated 1-28-2022) listed on the Microchip site: https://www.microchip.com...plab-xc-compilers#tabs..

View Article

do NOT use XC16 2.00 (JPortici)

As it produces significantly worse code. I am comparing builds in one of my bigger firmwares, XC16 2.00 Optimization level -O0 is about 12% bigger, about 2% bigger in -O2 And most of the changes are an...

View Article


Totally confused by O2 code (perdrix)

This is a sample of a small section of O2 code output (dsPIC33FJ12MC201) 1038: SPI_Received = SPI1BUF; // Read SPI input into buffer0004F4 801240 MOV SPI1BUF, W000059C 780080 MOV W0, W100060E 780080...

View Article


Code example will not compile (timr@circuitabbey.com)

Hi,I am using MPLAB X IDE v5.50 and the XC16 compiler for a DSPIC33FJ128GP802. I copied this code from 70211B section 33: Audio Digital-to-Analog Converter (DAC) void__attribute__((interrupt,...

View Article

Location of fgetc() source code for XC16 1.70 (john.dammeyer)

I've tracked a getchar call, which is really an fgetc(stdin) which should ultimately callsint __attribute__((__section__(".libc.read"))) read(int handle, void *buffer, unsigned int len) {with what...

View Article

Possible reasons for unexpected behavior using O1 and O2? (QuantumCat)

I've noticed with a few projects that I get unexpected behavior using O1 and O2 compiler options, but using no optimization produces the expected results. Is this common to encounter? What might be the...

View Article

Problem when passing function parameters (Zelig63)

I have a function which takes 3 int parameters. While debugging, when I enter the function with F7, the first two parameters are correctly transmitted to their corresponding function variables (0x0077...

View Article


error: 'for' loop initial declarations are only allowed in C99 mode - Solved...

I've just pulled in sum code i wrote a while back and i'm getting the following error: error: 'for' loop initial declarations are only allowed in C99 mode How do I allow "C99 mode"? long power (long...

View Article

How to handle global variables in XC16 (ian_3k)

I'm confused. I'm using XC16 V1.60 for a project. If I declare a global string variable and give it a value by placing it in my globals.h file, it complies fine if I have only 1 #include globals.h in...

View Article


Bug related with rounding. (andrebastos)

Microcontroller: dsPIC30F6011A Program: MPLAB X IDE v6.00 Compiler: XC16 v2.00 Hello. I would like to know how could I solve a problem related with rounding and the use of the sprintf function. Here is...

View Article

XC16 C90 option? (ian_3k)

Is there an option to use C90 in the XC 16 compiler as there is in XC8?I am struggling to get things that I have used before in XC8 to work in my program using XC 16. One thing I usually do is select...

View Article


dsPIC33CD - New architecture? (rehakmatej)

Hi,I have recently downloaded MPLAB X IDE 6.00 and in the device family packs I see new dsPIC33CD-MC_DFP. Is this DFP for some new architecture? Thank you for...

View Article

Help with passing variable between applications on same chip...

Firstly I appologise for my lack of knowledge - i am trying to work on a soloution with very little skill. EDIT:PIC24FJ64GB202 chipUsing MPLAB X 6.0XC16 v2.0 compiler My setup is this...I have an...

View Article

dsPIC33CK CANFD C1RXInterrupt Failure (l.rouco)

Dear all,I'm trying to use _C1Interrupt in a dsPIC33CK32MP506, but it works wrong.I'm using MPLABX v6.00, XC16 v2.00 and I have used MCC v5.1.2 for startup configuration.I activate _C1Interrupt doing:...

View Article
Browsing all 1508 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>