14

DEBUGGING ARDUINO IS A FUCKING PAIN WHYYYYY

FUCK THIS PROJECT
FUCK SPI
FUCK I2C
FUCK JTAG
FUCK PROPRIETARY DEBUG HEADERS
FUCK USBTINY
FUCK AVRDUDE

Comments
  • 1
    Yeah, don't use Arduino. You are just limiting your self. Also, JTAG debugging exists.
  • 0
    @Bybit260 only on the Due.
  • 0
    @F1973 LMAO
  • 0
    Ah, Arduino. Good old times!

    But I'm now working on an Arm core with a proper debugger in VS Code. Everything is written in Rust as well!

    Love it, won't go back if I can
  • 1
    @OmerFlame If you weren't using Arduino you could use the AVR gnu toolchain. It includes GDB.
  • 0
    @Bybit260 it doesn’t have the ecosystem, not to mention the incredible library that I am using for my display...
  • 4
    Debugging sucks less if you don't write as many bugs in the first place. ^^
  • 1
    @Fast-Nop sounds easier than it actually is.

    Output to serial monitor (the ONLY way to actually see values) = instacrash/VRAM glitches
  • 1
    @OmerFlame Provably running out of RAM.
  • 1
    @Bybit260 I AM sorta running low on RAM, but it says I am using about 86% of the RAM. Oh, and I also recycle most of my variables.
  • 3
    @OmerFlame that's usually only the amount used in static buffers. So for the stack there's only 14% left.

    Try to make some arrays and big objects that are static const.
  • 0
    @Geoxion oh boy.

    Good thing I fixed my issues! I fixed E V E R Y T H I N G
  • 2
    @OmerFlame What u did to fix it? lol
  • 0
    @Bybit260 Alright, so the customer wasn’t quite satisfied with the save/load menu I built, said it was too complicated. I fixed it and he liked where it was going. But he wants some more features and there are more issues I haven’t addressed YET. Tomorrow I will address them, fix them and implement another feature.
  • 3
    @Geoxion And use GCC with -fstack-usage to get an idea on the worst case usage. It's a fair bit of manual analysis though because the calltree isn't analysed.
  • 0
    Debugging embedded stuff isn't actually that bad, but it is vastly different to higher level stuff. The issue with Arduino is that it often tries to pretend the lower level limitations and approaches don't really exist, which really doesn't help if you're having issues.

    Ditch it and move to a modern, dedicated embedded platform and you'll likely fare better, and learn loads more too.
  • 2
    @AlmondSauce Any suggestions? I’m teaching physical computing to CS students and I start with Arduino because it’s easy for beginners with no experience in electronics and there are millions of tutorials and examples.
  • 1
    @lastNick first of all, teach them the basics of computer science: integers, chars, strings, all of that. Then, teach them a blink function, serial monitor, and then start going bigger, like, communicating between 2 Arduinos bigger.

    Well, maybe not that but still. Teach them about the ADC, and work your way up to the really hard things (keep the storage and RAM constraints in mind! People say that the sky is the limit but here, 32KBs are the limit, unless you go for Arduino Due).
  • 0
    @lastNick In terms of boards, when I taught at uni we used the FRDM boards which worked quite well.
  • 1
    @OmerFlame As these CS students are already in their 3rd semester I don’t need to teach them the basics of programming. In the first 3h unit of this course blink and a traffic light will run on a breadboard.
  • 0
    @lastNick oh right, I forgot that they are 3rd semester.

    NOTE: Arduino’s string data type is a little special and it doesn’t abide by the standard C++ std::string class. Make sure to research on that a little.
  • 2
    Just don’t create bugs? Hahaha
  • 0
    Ya... Should learn I2C too.
    Tryed one time, two days of pain, a damaged segment screen to find out the I2C module was damaged...
    Should try again tough.
Add Comment