MCUdude / MicroCore

A light-weight Arduino hardware package for ATtiny13
551 stars 88 forks source link

Problems disabling safe mode. #162

Open XanCraft21 opened 2 days ago

XanCraft21 commented 2 days ago

Boards version: latest (i will add the version number later), Arduino version: 1.8.19, Operating system: windows 10,

Hello, i am having trouble disabling safe mode in this software package, my sketch doesn’t want to fit, and it’s not even that big (it is a little but i thought it would fit). According to the description in the core_settings h file, if i disable it, it will give me more flash space, and i can see that the flash usage seems to ramp up quickly, even for a small code.

Unfortunately disabling safe mode has the opposite effect, taking up 2 single bytes of flash instead of giving me a bunch more free space. I tried commenting out the define for it, i tried defining DISABLE_SAFEMODE (i think i have it right) in my main sketch like i saw where it says ifndef in core_settings, i can’t disable it correctly.

Is this a bug in the most recent release? Thank you for any help you can give me.

MCUdude commented 1 day ago

Can you post your sketch? There may be other things you can do to optimize your code to make it fit.

MCUdude commented 1 day ago

I'll look into why the sketch size increases.

XanCraft21 commented 6 hours ago

I will post my sketch in a gist when possible. I was using the standard arduino functions, so maybe that’s contributing?

I could always try avr c code like shown in some of the examples, which will require me to make some of the gpio functions myself. I personally prefer the native arduino functions though.

Do you know of another way i can disable safe mode to get more flash space?