ATtiny13A TIL #129
Replies: 5 comments
-
Hey Lief, Glad you're finding the new register access commands helpful. I use them to manage peripherals during debug sessions, which can be really helpful at times (for example, I often need to turn on/off a timer in between stepping). I touch on this in the following article: https://bloom.oscillate.io/docs/debugging-wch-riscv#accessing-peripherals. The examples are specific to a WCH RISC-V target, but most of it can be applied to AVR targets.
Just FYI: in case you or your students ever want to use an IDE with headless Bloom, you should be able to access peripheral registers via the IDE, using an SVD file (assuming your IDE provides such functionality). You can generate an SVD file via the relevant target details page on the Bloom website: Then pass that to your IDE, which should then allow you to access peripheral registers via a GUI. In CLion, you can supply an SVD via the "Peripherals" pane: Then CLion will automatically read register values and display them in the pane, as well as provide the ability to write to the registers and individual bit fields: That's how CLion does it. I'm sure the other popular IDEs do something similar with SVD files. So that's just another way you can access peripheral registers in the absence of the Insight GUI. |
Beta Was this translation helpful? Give feedback.
-
Yes, i see the method of using an SVD, and your page on the ATtiny13A was very helpful to get me started. I used it to ensure I had the right information (along with the datasheet). I've been using I've got my gdbinit setup, so that td disables and te enables (TUI) so its very easy to go back and forth. |
Beta Was this translation helpful? Give feedback.
-
BTW - I wanted to add this very important point. I loaded a Raspberry Pi 3 with 2GB memory with the full tool chain along with gdb and Bloom. I don't notice any significant difference in CLI response than what I have with a Raspberry Pi 5 8GB. Which is fantastic! This means, it's not the power of the processor which matters, its the ingenity of the software. It also means i can recommend the Pi3 to my students as a very capable, embedded computer development system. Note: I might have to have them install an Arch Linux or something other than Bookworm, for Debian's gcc tools seem to be stuck at version 5 or 7. |
Beta Was this translation helpful? Give feedback.
-
Fair enough 👍🏽
That's good to hear. I've only tested the headless build on a Pi 4, so good to know it works on an older version.
Hmm, I wonder how difficult it would be to install Arch on a Pi. Also, keep in mind that I don't currently provide an Arch Linux package for aarch64. I only provide Arch Linux packages for x86_64. In a slightly unrelated topic, I'm curious to know if you've noticed a difference in programming speeds, when using GDB's load command? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Today I learned
I wanted to try using chip from bare IC and one which could provide a minimal, however, versatile clock and chip I/O. Part of this desire was to gain a greater familiarity with gdb and Bloom as well as using the Raspberry PI for remote development. The experience has been great!
Some hints:
1.) Don't trust AI on simple datasheet information. Even with Claude 4, it had massive errors in things as simple as pinouts, such as swapping the MOSI pin for the MISO pin.
2. Even though you're going to want to use debugWire as it only consumes 1 pin, you will need to wire the chip using ISP. Then just let Bloom do its thing.
3. Sometimes, it helps to use
avrdude -p attiny13A -P usb -c atmelice_isp -t
just to confirm the part, configuration etc.4. I'm using headless Bloom so I miss Insight, which is phenomenal, however, its like all GUI's. Once you've mastered the text commands, you don't miss it. (Insight is still phenomenal, just not available, headless.)
5. The new text registers commands such as ``mon rr
and
mon wr``` are fantastic and the reason why Insight isn't as necessary. I was setting up the timer clock on the ATtiny13A and it was great to be able to do this, to confirm my parameters:It's unfortunate, the colors can't be represented on this entry. The display is lovely.
My setup is:
Thank you again for Bloom it is a joy to use.
Lief
Beta Was this translation helpful? Give feedback.
All reactions