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

quickstart documentation should contain links on the programming API #106

Open
marcmerlin opened this issue Dec 31, 2020 · 6 comments
Open

Comments

@marcmerlin
Copy link
Contributor

Hi @mithro. Ok, so I flashed ledpulse, it works (after reflashing the bootloader and rescuing tomus that wouldn't flash).

I then spent hours looking at it, doing my own example with much trial and error as I can't find any documentation for the APIs used, and all I know how to debug with is whether the LED turned on or off, and I can't even seem to change it with set or clear, but only with gpio_toggle. Sure, there is a libopencm3/include/libopencm3/efm32/common/gpio_common.h which isn't much of an API.

I'm totally shooting in the dark, it's not fun.
Could write documentation that gives more info on what to do next, written for someone who only knows arduino style programming? (a reasonable target I assume).

After some searching, and figuring out what chip I had, I found http://libopencm3.org/docs/latest/efm32g/html/modules.html
but that doesn't quickly show me how to use gpio_set vs toggle
None of the examples in https://github.com/libopencm3/libopencm3-examples/tree/master/examples seem to be for this chip.

Similarly, outside of LED debugging, there is obviously no Serial.print debugging. Can you give more details on how to setup an emulator and do proper debugging given that using the target for that, is an exercise in frustration?
Thanks

@mithro
Copy link
Member

mithro commented Dec 31, 2020

Does https://github.com/im-tomu/tomu-samples help?

@mithro
Copy link
Member

mithro commented Dec 31, 2020

There is also some stuff at https://github.com/im-tomu/toboot

@mithro
Copy link
Member

mithro commented Dec 31, 2020

It has been a long time since I've even thought about the Tomu (as opposed to the Fomu). I don't think we ever had anything like the Fomu workshop for the Tomu?

@marcmerlin
Copy link
Contributor Author

Yeah, I know I'm late to the party, sorry @mithro , I'll do Fomu next.
I did use the samples, but it took me forever to modify one (send a PR #107 which took me hours to write with lack of debugging or having any clue to use some of the API functions).

I was hoping to find how to register a touch, to affect the LEDs, but didn't find anything in the examples. Of course, an API with all the IO ports, and functions to access them properly, would help. I'm fine with arduino, but I feel like a total noob here :)

@mithro
Copy link
Member

mithro commented Jan 2, 2021

The Tomu was never really targetted as "easy to use", it was always more targetted at "doing things like this is possible" space. That did start to shift as more precanned examples existed but was always limited by the inability to run things like MicroPython.

This does make me realise how powerful things like the gdb over USB wishbone stuff that we have on the Fomu potentially are.

With something like the Tomu, the first step is to get USB serial working so you can do printf style debugging. Or you solder a DAPlink style probe to your hardware...

I'm wondering if you could do a preprovided "operating system" with syscall for the USB / printf style stuff.

@marcmerlin
Copy link
Contributor Author

@mithro Fair enough, I see I mostly wasted my time trying to use tomu when effectively it's mostly dead now that fomu is out (which I understand).
Mmmh, well, given that I spent the time already, in case there are still people out there who might try to use tomus, are you ok merging the doc updates I wrote for you? #105

For programming, I didn't get very far (didn't find an easy way to query the touch sensors), but I wrote an improved LED example if you're ok merging it:
#107

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