Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:28 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMX library question

Author Message
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2075
Posted: 04:04pm 31 May 2024
Copy link to clipboard 
Print this post

I guess this is one for Pete M.

I have just got my MMX board out of store to use with a VGA screen to develop a bit of graphics software as a result of my ongoing saga of the lost F4s (actually, now I am back, I wonder how come I ever stopped using this amazing beast as my daily driver???)

anyway... as part of my settling back in, I transferred a library of useful code (that I always have as part of my dev environment) from a uMite to my MMX.

I did this with a LIBRARY LIST, scrape the console, F10 it into the MMX and then LIBRARY SAVE... all goes according to plan.

so here is the memory count on the uMite:



The memory count on the MMX shows the library much larger. Here is the result of loading the prog and saveiving to the library on the MMX



my question should be fairly obvious (and maybe has an obvious answer): Why has 4K of library space jumped to 16K on the MMX? Maybe the architecture of the 32MZ CPU can only talk to flash in pages of 16KB or something, but VAR SAVE of a variable only bumps FLASH by 1K. LISTing the library only renders the original ~3KB of text and it all runs fine, so it isn't a problem as such.

I did do LIBRARY DELETE on the MMX before, so it was clean.

Thanks in advance.

h
Edited 2024-06-01 02:39 by CaptainBoing
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 9110
Posted: 04:49pm 31 May 2024
Copy link to clipboard 
Print this post

It has been a long long time since I've looked at this but I seem to remember the minimum flash erase size on the MZ is 16KBytes so even a single statement in the library will use 16K of flash.
The erase size on the RP2040 is 4K hence the difference
 
CaptainBoing

Guru

Joined: 07/09/2016
Location: United Kingdom
Posts: 2075
Posted: 06:59pm 31 May 2024
Copy link to clipboard 
Print this post

Thanks, I suspected something like that (16K is a very computery type number)

I'll add some more stuff to the library, keep it under 16K and I am guessing the size in flash won't change...

<french accent>
a few minutes later
</french accent>



That pins it down.

Thanks Peter

h
Edited 2024-06-01 05:07 by CaptainBoing
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024