XC32 warning: 'packed' attribute ignored for field of type uint8_t (user2x)
Hello,XC32 3.50 and 3.0 I get a heap of these warnings on some code I am porting.Such as:warning: 'packed' attribute ignored for field of type 'UINT8' From this for example: typedef union { UINT32 Val;...
View ArticleCompiler allocates 1 Byte to enums, but MPLABX assumes 4 Bytes (int) (adown)
Hi, i'm trying to figure out why gcc is allocating 1 byte to the enums that hold my FSM states. Reading the documentation it seems like in the absences of the -fshort-enums command line option gcc...
View ArticleNewbie needs help measuring frequency (down_under)
Hi,My project needs to measure a 125 khz signal on GPIO pin PA05I have created a Harmony v3 project for SAMD21 in MPLABX 5.5Have set up interrupt EIC Channel 5, enabled interrupt and set to rising edge...
View ArticleHow to sscanf a 32 bit number uint32_t ? (user2x)
I am struggling today. Compiler XC32 2.50 PIC32MZ2064DAR169 a simple format specifier problem. I need to input a 32 bit number basically unsigned long or uint32_tI have this: char in_str;...
View ArticleTrouble with constant in flash not expected values (user2x)
Hello, XC32 V2.50 PIC32MZ2064DAR169 The constant as below seems to be rubbish instead of the expected string. typedef struct { char app_ver_string; uint32_t checksum_en; uint32_t checksum_de; }...
View Articlepic32m-gcc.exe crashes on windows 10 (schroedercn)
Hello, I am using XC32 compiler (v3.00) with MPLAB-X v5.30 on windows 10. I have an existing C project on a 24bit dsPIC that is compiling fine with XC16 compiler v1.31. Now I want to migrate to a...
View ArticleAre variables declared with CACHE_ALIGN / __COHERENT initialised? (user2x)
Does anyone know? RegardsX..
View ArticleXC32 v3.00: Unable to inline function calls in nomips16 function (khallenbeck)
In XC32 versions prior to v3.00 the following compiled fine:static __inline__ int __attribute__((always_inline)) add_mips16(int a, int b) { return a + b;}int __attribute__((nomips16)) add_nomips16(int...
View ArticleTrouble with interrupts at_vector XC32 PIC32MZ (moeller)
Hi I am fighting since two days with this problem:A simple interrupt functions is not invoked by the peripheral:void __ISR_AT_VECTOR (_TIMER_2_VECTOR, IPL4SRS) T2Interrupt(void). I find the code at...
View ArticleSetting up the cache: How? Do I need the pic32-libs ? (user2x)
Using XC32 2.50. PIC32MZ2064DAR169 Harmony3 How do I control the cache setup? This link describes how to turn off the cache by copying:https://microchipdeveloper.com/32bit:mz-cache-maintain-coherency...
View ArticleXC32 v3.00: Unable to use volatile keyword with variables placed in program...
In XC32 versions prior to v3.00 the following compiled fine: extern volatile const union Configuration_Parameters __attribute__ ( ( space ( prog ), address ( CONFIG_BLOCK_START_ADDRESS ) ) )...
View Articleshift, lvalue required (horkesley)
Hi, problem with lvalue required. /* *struct for eulers angles */ struct angles { uint16_t euler_h; uint16_t euler_r; uint16_t euler_p; } angles; bno055_read(BNO055_EULER_H_MSB_ADDR); angles.euler_h...
View ArticleCan you combine functionality in the same library ... (SM6FIE)
Can you combine functionality in the same library file for processors with different capabilities?For example PIC32MZ2048EFH100 and PIC32MZ2048EFH64 are very similar. However the 100 pin device has the...
View ArticleC++ XC32 3.01 Warrnings and error (Voop)
Hello, project for PIC32MX440F512H 1. const int __attribute__((space(prog))) Config[] ={ 2, 5}; Got some.hpp:177:47: error: space("prog") variable 'Config' should be const qualified If add size of...
View ArticleXC32v3.xx and inline (al_bin)
Really ?#include void inline NotCompilingInXC32v3(void){ LATAbits.LATA7 = 1;}int main(int argc, char** argv) { NotCompilingInXC32v3();} All version 2.xx OKv3.00, v3.01 :/mnt/3DE588270DE74C19/Projekt..
View ArticleXC32 v3.01 and PLIB (Nexsys)
Hi,I'm trying to update a project from XC32 v1.xx to XC32 v3.01.I used PLIB in the project, and would like to continue using it.However, when I compile the project in XC v3.01 I get a ton of errors...
View ArticleCannot execute assembly ISR compiling XC32 with MPLABX for PICMM0256...
I'm having great difficulty getting ISRs to work properly under XC32 v3.01 and MPLABX 5.5, using the PICMM0256GPM48. My end goal was to have the ISR for timer 1 working via assembly, but moving in baby...
View ArticleThrowing an error based on a #define value - How? (user2x)
XC32 V2.50I have a seemingly simple problemI need to thrown an error at compile time as in the following: #define UART2_FrequencyGet() (uint32_t)(25000000UL) //defined by the Harmony system#if...
View ArticleConfusing behavior after shifting bytes (tdarlic)
HiI am writing code for the PIC32MX250F128D and I have a function which validates the CRC of the data received from the RS485 bus connected to sensors. Function is fully pasted below. I have switched...
View ArticleUnexplained code crash exception (user2x)
Hello,PIC32MZ2064DAR169 XC322.50 MPLAB 5.50 Harmony3 The code started crashing. At first, only in release mode and NOT in debug mode. I determined the crash occurs in the SYS_Initialize() call. Adding...
View Article