PDA

View Full Version : Truncated Core Size Messages For 18F26K22 ?



gunayburak
- 5th November 2015, 14:42
Hello everyone ..

Today I've realised an interesting problem with Microcode IDE ..
Yesterday I purchased two 18F26K22 MCUs to play with ... Until today with 16F series I've always been warned by the compiler when I excess the range of the memory with a message called "Truncated core size" .. But with this 18F26K22 , the compiler keeps compiling even though the bytes used are indicated more than 64000 bytes , I know this MCU has 64 Kbytes flash memory but it never displays such an error message .. Anyone has an idea ? or maybe my compiler is damaged somehow ?

Thanks in advance ..

HenrikOlsson
- 5th November 2015, 17:05
Hi,
So how big IS MicroCodeStudio reporting that code is? I'm asking because 64KB is 65536 bytes...not 64000.

/Henrik.

gunayburak
- 5th November 2015, 17:25
I just copied some LCDOUT special character line over and over again in order to test the IDE .. and the code has reached to 129010 bytes .. But it still compiles succesfully even though it has exceeded the max. flash memory range ... :) Is such a thing possible ?

HenrikOlsson
- 5th November 2015, 19:58
I believe that the final code size is returned by the assembler and not by the compiler.
Since some 18F parts are capable of extending its program memory to external memory it's possible that the assembler doesn't care what the final size actually is and therefor happily assembles the program no matter what.

Of course, I'm only speculating.

/Henrik.

gunayburak
- 5th November 2015, 21:23
Hmm... Sounds logical ...

Art
- 6th November 2015, 02:00
You should be able to tell by the file size of the compiled hex,
Or if it has inline asm you could use org to shove some program code in a location that doesn't exist on the chip.