Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems disabling safe mode. #162

Open
XanCraft21 opened this issue Nov 14, 2024 · 4 comments
Open

Problems disabling safe mode. #162

XanCraft21 opened this issue Nov 14, 2024 · 4 comments

Comments

@XanCraft21
Copy link

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
Copy link
Owner

MCUdude commented Nov 14, 2024

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

@MCUdude
Copy link
Owner

MCUdude commented Nov 14, 2024

I'll look into why the sketch size increases.

@XanCraft21
Copy link
Author

XanCraft21 commented Nov 15, 2024

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?

@XanCraft21
Copy link
Author

Hello, i wanted to post a quick update on this issue.

I noticed that this boards package has gotten updated. After installing it, regarding the safe mode thing, not a big change has happened. Disabling it no longer adds 2 bytes of flash usage, but i still don’t see anything decreasing when i do disable it.

As for the sketch i got a bit sidetracked, so i will post that when i can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants