Jump to content

Recommended Posts

Posted

Hello,

I've been working on a Midi2CV project that I'm using to control the minimoog model d clone I built. I've basically run out of flash on my PIC and I'm at the point where I'm (dangerously) sharing variables in order to keep code size down.

I'm wondering, is there some way that I can compile my code so that I put some of it on my bankstick and overlay it into flash at run time? I'm too cheap to switch to the newer 32 bit hardware.

Has anybody tried this? Is any kind of interrupt invoked if you try to write beyond the end of your flash memory? If so, would it be possible to build some kind of bankstick code memory manager?

Thoughts?

Joe R.

Posted

Depending on what you mean by "sharing" variables, but one way to do save memory for temporary variables is to declare them within the scope of the function where they're used. This way they are generated from the C stack each time the routine is called and the stack space get used and reused over and over very efficiently (and is good coding style).

Updating the flash program from eeprom (presumably frequently ) is likely to wear out the flash memory of the PIC. Its also nontrivial to code, unsupported, and I suspect, putting a huge hurdle between you and your desired project outcome :-(

My suggestion is to get a job and go 32bit! ;-)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...