-
Apologies if this is a dumb question, or if there is a better place to ask these sorts of questions, but I copied and pasted the arduino uno serial example and successfully flashed it to my arduino uno, but I'm unable to see any of the "Hello from Arduino!" or the "Got {}" messages. I'm on a mac and ran
But couldn't see any messages coming in while I was typing. Is there an equivalent to the Serial.print with the normal C/C++ variant that Arduino uses?
When I run the same screen with something like that, I can at least see values coming in. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Can you share more details what exactly you were doing? How did you build the example? How did you flash it? |
Beta Was this translation helpful? Give feedback.
-
All the code is here: I copied the src directly from: To build it, I installed all of the avr tools, overrode rust to nightly, and just ran To flash it, I ran This was the output of both of those commands:
Then when I ran Thanks for taking a look at this. Let me know if there's something else you need. |
Beta Was this translation helpful? Give feedback.
-
Hmm, so you're building a debug build:
and looking into your [profile.dev]
panic = "abort"
[profile.release]
panic = "abort" This will produce a huge bloated binary because absolutely no optimizations are done (no inlining, dead code removal, constant folding, etc.). This means, it eats a lot of the available flash memory (23.3 KiB from your output above) but will also run very slowly. I could see this massively throwing off the timing for the USART peripheral and thus nothing is working. It could also run into a lot of other issues due to the missing optimizations. I would recommend trying to configure the compiler to more aggresively optimize, in both debug and release builds. In step 5 of Starting your own project in [profile.dev]
panic = "abort"
lto = true
opt-level = "s"
[profile.release]
panic = "abort"
codegen-units = 1
debug = true
lto = true
opt-level = "s" I'd give those a try, maybe that is all that's needed to make it work :) |
Beta Was this translation helpful? Give feedback.
-
Ha, turns out, that was all it was! Thank you so much! |
Beta Was this translation helpful? Give feedback.
Hmm, so you're building a debug build:
and looking into your
Cargo.toml
, I see you've configured the compile profiles as follows:This will produce a huge bloated binary because absolutely no optimizations are done (no inlining, dead code removal, constant folding, etc.). This means, it eats a lot of the available flash memory (23.3 KiB from your output above) but will also run very slowly. I could see this massively throwing off the timing for the USART peripheral and thus nothing is working. It could also run into a lot of other issues due to the missing optimi…