This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C Preprocessor Problems (MDK Lite with STM32F1)

I was trying to create an equation that told me how many flash blocks (pages) it would take to store some data I need. This may take up exactly a certain number of Flash blocks (pages), but more likely there will be spillover and part of (well, all of) another flash block will be needed.  The C preprocessor gives wrong calculations for 2 of the three methods I have tried. All 3 methods work on Compiler Explorer and the freebie IDE that comes from the chip manufacturer.  Maybe there is something I am doing wrong, but so far it escapes me. Is this possibly a compiler bug?

0