Complex types not supported (JPopken)
Hello, I am trying to resurrect an old project. I believe the original project was using the xc16 compiler. I have a problem in that the c source code uses the __complex__ data type and I get the error...
View ArticleASM16 syntax for expressions with special operators (Ancodec)
I am trying to load an SFR with section's last word address. The elegant way to write this would be MOV #(.startof.(s_SampleBuffer)+.sizeof.(s_SampleBuffer)-2), W0 or MOV...
View Articlexc16 v1.30 false Illegal Opcode and trap conflict resets (WVFishFearMe)
I'm developing with MPLABX, PIC24HJ128GP502, and xc16 v1.30. During clock switching to Primary + PLL I get either an illegal opcode or trap conflict reset. If single-stepping through the clock switch...
View ArticleInformation ELF and COFF files to generate .a2l (Stampede)
Hi, I'm despreately trying to generate a .a2l for vector CANape with XCP.The ASAP2 tool that i use supports ELF or COFF files. The COFF created by XC16 is huge (>10MB) and somehow screws up the...
View ArticleFlash writing works on one pic but not another! (seyyah)
I can write to flash memory of dsPIC33EP256MC206 using the library function "_write_flash_word48()" but it does not work on dsPIC33EP64MC204. I also tried _write_flash_word32(), _write_flash24() and...
View Articlepreprologue ignored (vjasinski)
MPABX 2.35, XC16 1.24, WinXP, dsPIC33FJ64MC802I am trying to use the 'preprologue' directive to insert some asm code in an interrupt handler.void __attribute__ ((interrupt,no_auto_psv,preprologue("BSET...
View ArticleProper syntax for loader instructions (DaveNH)
I am attempting to create a code update loader (similar to a boot loader) which has a loader function and application function.To do so I am replacing the standard CRT0 file with my own version in...
View ArticleHow to stop linker from generating IVT? (nwetter)
Apparently, starting in v. 1.26, for who knows what reason Microchip made it impossible to stop the linker from generating the IVT: http://www.microchip.com/forums/m917841.aspx Has the situation...
View ArticleFunction Parameter For Writing Bytes "& 0x01" ?? (ChollyMo)
I'm analyzing a function, I found on the net, that transmits a byte from a master to a slave device. I don't understand what the "& 0x01" means or does. I'm used to seeing multiple arguments,...
View ArticleProblem compiling xc16 1.26 project with xc16 1.3 (xiaomin.lin)
First, I am new, please be gentle...I am working on a dsPIC33FJ chip, so I downloaded and installed MPLAB X IDE v3.50 and XC16 v1.3. But when I got source code from another engineer, I got error of...
View ArticleXC16(v1.30) linker script CRT_STARTMODE warning (DaveNH)
My program builds and links OK with XC16(v1.25) but I get the following using v1.30: c:\program files (x86)\microchip\xc16\v1.30\bin\bin\..\bin/elf-ld.exe: Warning: linker script did not specify...
View ArticleSuddently, compile errors because multiple definitions of interrupts. (Jack_M)
I am updating a working project.I modified one source/header module and now i can't compile during linking, the error i get isbuild/default/production/interrupts.o(.isr.text+0x0): In function...
View ArticleCE482 FFT dsplib code example (Srge)
Hello all, I am trying to run the code example in the title on a dspic33ep512mu810 but I am getting the error below. I am quite new to this... Does anyone have any idea of what's wrong?Thanks a lot for...
View ArticleThe no_auto_psv attribute in ISR (gardener)
For a PIC24 application that controls a servo, I am setting the OC1RS register in the Timer 2 ISR.I've tried defining the ISR this way:void _ISR _T2Interrupt(void) and I get some warnings:main_P2.c: In...
View ArticleXC16 v1.26 build failing -- (944) data conflict at address... (awolfe)
I updated to v1.26. It worked for several compiles... but has now started giving me this error at the end of the compile. "C:\Program Files (x86)\Microchip\xc16\v1.26\bin"\\xc16-bin2hex...
View ArticleReset() for XC16 (kda406)
On the C30 forum I see the recommendation to use Reset() to execute a soft restart on a PIC24, but I cannot find the correct usage on XC16. I put Reset() in my code and the compiler seems to work, but...
View ArticleDefine a section with a particular length in code (h.mueller)
Hi,is there a preprocessor statement or attribute which I can use to declare a section in code? I use #pragma code bootloaderint __attribute__((section ("mysection"), address(0x1000)))fkt1(void)int...
View ArticleXC16 interrupt and section attributess together don't work (DaveNH)
I can't get the Default Interrupt handler to reside in my loader space as is needed. Any idea on a syntax that will work? What works for non-interrupt functions does not work with the interrupt...
View ArticleAll code moved to boot segment (Sean831)
I am trying to move all of my code to the boot segment before the aivt. I was able to move most of my code but the irq routines and the compiler generated functions (.text and .dinit sections) are...
View ArticledsPIC33EP64GS502: PWM Generator module control (manish.kumar)
If we set the PTEN bit(shown below), I guess it enables the whole PWM module along with all the 5 PWM generators. PTCONbits.PTEN = 1; My query is: Is there anyway to control the enable/disable the...
View Article