I have this DMA-heavy code filled with code like
DMA1SA = out; /* out is a uint8_t * */
In the small code memory (I'm using the latest GCC) all is well and it works fine; now the program is grown and I need to use the large model, where pointers are 20-bit wide.
PREMISE: out is in RAM (so >10000h) and anyway it would work fine since DMA1SA is defined as
extern volatile unsigned long int x asm(xxxx)
... I have however an 'assignment makes integer from pointer without a cast' warning. I hate warnings :P
Next try:
DMA1SA = (unsigned long)out
... nope, 'cast from pointer to integer of different size'
tried the __data16_write_addr intrinsic, but the problem remain (since it works using an unsigned long)
Is there a clean way to fix and silence the warnings or I have to live with them (silencing can be done with -Wno-int-conversion)? Ideally there should be something like an uint20_t type, but I didn't find it.
Am I wrong somewhere?