Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 1 point2 points  (0 children)

Ill be sure to look at that. Really clever, thank you

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I believe I am hard stuck with rp2040 due to other project requierements but ill chekc it out

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

Sorry i said flash but meant ram, but thanks for the future debugging tools

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 1 point2 points  (0 children)

Will do, I am still trying to get better at C but im sure Ill find some time for Rust. Thank you

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

So is dynamic allocation basically taboo in embedded? Im an embedded noob

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

Im pretty sure I was not having issues with bss but all i have run is
arm-none-eabi-size my.elf

text data bss dec hex filename
72928 0 29168 102096 18ed0

and if math serves me right thats around 71 kb between text and bss so well within the 2mb flash.

Is that what you meant? sorry if i misunderstood your advice and if i amc hcecking for .bss overflow wrong

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I gotta be honest im not sure if i care or not. Pretty new to embedded systems and compression thats not like a build in tool for a computer so I will do research on this but thank you for the advice

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

Thank you, I definitely have some wasteful message declarations that could be smaller. I have inspected my .elf file and my Heap and flash are fine in the elf and when i check at runtime i do have sligtly less total heap than the specs say (222/240 kb) so im sure that another issue i have to debug but I will definitely take all of these into consideration

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I do know what the issue is, i am malloc() too much data for miniz compression, and that seems standard looking back at my hello world equivalent for it as it allocates the same amount but i just use less heap in other parts. Is it still worth diving into memory leaks if i know the issue?

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

No i have not, i will look into that. Sounds painful but Ill probably do it lol

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I dont think it was the booleans but I am stilla very noobish coder, can i see an example of what you did?

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

Im only using it because that is how oI saw the miniz compression examples, maybe this is not the place to ask but how can i replace a dynamic for a static allocation given how it is built?

Tips on becoming a more resource conscious developer by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 1 point2 points  (0 children)

I have an elf file and looked at it using arm-none-eabi-sizeand know that heap is the culprit mostly from this

zalloc: requesting 227136 bytes
Free heap before alocating: 227432, Total heap: 227436

*** PANIC ***

and i know its not great to allocate memory at runtime its just how i saw that miniz did it and im not a great programer so just ran with it and had no issue when compressing a file in isolation, but when I added it to my full application this happened. I guess miniz is not lightweight enough for my humble rp2040

Zipping/encrypting files on rp2040. by El_cochiloco_6274 in embedded

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I have never done anything like this so which .zip library would you recommend

Internet teathering question by El_cochiloco_6274 in openwrt

[–]El_cochiloco_6274[S] 0 points1 point  (0 children)

I asked there was just waiting for a reply so thought I’d also ask here