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

tinyusb examples don't seem to work with current head of master (e928b868) #204

Open
tcal-x opened this issue Oct 26, 2020 · 2 comments
Open

Comments

@tcal-x
Copy link
Contributor

tcal-x commented Oct 26, 2020

tinyusb/examples/device/cdc_dual_ports doesn't seem to work with the foboot updater that I build at current master head, e928b86.

The tinyusb examples work with the foboot 2.0.3 release. Also, I checked out c9571b5 and rebuild myself to make sure it wasn't something in my build environment. That worked with the tinyusb examples as well.

I'm filing this so I have a place to record my findings if I get time to do any bisection of the CLs.

@xobs
Copy link
Member

xobs commented Oct 27, 2020 via email

@tcal-x
Copy link
Contributor Author

tcal-x commented Oct 27, 2020

Yep, that's it.

I changed to csr_data_width=8 in hw/foboot-bitstream.py, and also changed this line in sw/include/system.h:

 // Forward-define this function, because it's defined inside `csr.h`,
 // which includes this file near the top.
-static inline void reboot_ctrl_write(uint32_t v);
+static inline void reboot_ctrl_write(uint8_t v);

...which I was a little unsure about, but it compiled, and now the tinyusb examples work, with current master plus the changes above.

Now that you mention it, I do remember seeing some code that seemed a little funny in that it was relying on an implicit cast to 8b to truncate a value that was most probably outside of an 8b range originally. I can't remember exactly where I saw that code though.

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