开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Sketch Size


 

Hello. I apologize for the stupid question, i need to somehow reduce the size of the sketch so that it fits on Atmega 328P?
The sketch uses 33776 byte (109%) of memory.


 

I'm not an active contributor on this group but it would probably be useful if you posted a description of what the sketch does and a source listing of the sketch.? Someone might spot a way to reduce the sketch size somehow.

If there's a large library that's contributing to the size, maybe you could find a simpler?library that does what you need?

On Tue, Nov 16, 2021 at 10:00 PM <rk3att@...> wrote:
Hello. I apologize for the stupid question, i need to somehow reduce the size of the sketch so that it fits on Atmega 328P?
The sketch uses 33776 byte (109%) of memory.


 

Here are a few general tips for reducing code size.



--
======================
Brian McClure
Amateur Radio: NW4R
brian.mcclure@...

"Nothing is quite as dangerous or unpredictable as an engineer with
too much time on his hands."


 

You can also use this on other arduino comparable boards, Esp32, teensy etc. they all have larger memories and more horsepower. If you want to reduce the size you’ll likely have to eliminate some of the features. If you don’t need JT9 mode for instance or can slim down the timing code. You just have to go through the code and remove what you don’t need taking care that you adjust the rest of the code to make sure you don’t break it by removing a dependency for something else.

I wrote the original code some years ago and have since been working on a better version with significantly different encoding and likely on newer hardware. It’s all still a work in progress and time permitting though.


 

Big thanks for the answers. The problem resolved itself, apparently it is related to libraries. I started it on another computer and everything went well.


 

The newest version of JTEncode is significantly larger so my Atmega 328P code would no longer fit.? I needed to downgrade to v 1.21.? The newer version is a more complete implementation of the wspr standard, but I don't need any addditional features for my tracker.

Ken.?