-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
MSP430 Support #121
Comments
Great idea, adding non-ARM would be great, the stack doesn't rely on any ARM specific feature, hopefully it is easy to port. I will buy the board in the your link. |
My Launchpad arrived today. I will hopefully start the port this weekend :). |
I started writing updating the compiler quirks header file for the TI compiler. I'll finish writing it, and post a PR for it. I was running it for its MISRA reports. (I was using Tiva, not MSP430) |
@cr1901, I feel like I should be learning Rust, but just haven't yet. I'm sticking to C for now.... but I'd be happy to review your code once it's written. I need to figure out how to even compile Rust. Is it compiled to C? Or just in LLVM? How's the ARM backend in LLVM doing? I read its linker isn't reliable yet? As much as I've working on all the modules in tinyusb, I'm trying to focus only on what will get USBTMC working for me on STM32 (which means FSDEV, core, and implementing a class driver). I don't even have any USB-capable MSP430 here.... no, nothing to worry about. The newer launchpads have thing EnergyTrace thing which is quite great. It'll give you a real-time plot of the board's current consumption, so you can know if your sleep modes are working, etc. #157 has my compiler options patch, though I've only tested compilation for the TI ARM compiler, and not MSP430 (though I did mention MSP430 in an ifdef.... hopefully it's right). Perhaps you can review the patch to see if it works. |
@pigrew Hey, you can file an issue for TI Tiva as well, I think I have an Tiva C board laying somewhere on my shelf 😃 Hmm, what is Rust 🤔 , look like it is time to upgrade my brain 😄😄 |
@cr1901 How are you planning on adding rust support to TinyUSB? I am new to TinyUSB, following is the bindgen generated APIs that I currently have. One thing that noticed was that Rust lacks support for packed structs, so most likely I'll need to add descriptor support from C-land.
|
Okay, so this is not quite true. I started writing a
I'm not sure I want to maintain such a crate right now.
@hathach If you are following along, here's some context:
|
That's correct. Sorry I meant bitfield support. |
@cr1901 thanks for information, there seems to be a lot to learn with Rust. Let's me know if you need any helps to make tinyusb more friendly with rust. I probably wont help much with the rust implementation 😉 |
@rajivr Eep. Err, my personal opinion is that using bitfields in C is a bug, not a feature. Where are they used specifically in tinyusb when generating descriptors? |
I recall seeing it here. |
|
@cr1901 I am out now, but I think it would be a folder as follows hw/mcu/ti/msp_driver Where msp_driver (or msp430_driver) is the submodule. I will check their family line up for the name. Though if you know what it should, just create it locally for now, I will creat submodule as the name you suggested later. And you can make an pr to submodule to add those files. |
@rajivr those aren't required to build descriptor, you can just generate an byte array for descriptor, it is meant for the stack to parse the desc. User application can use it or not, In fact, in my example, I also use the uint8 array for descriptor using these macro templates https://github.com/hathach/tinyusb/blob/master/src/device/usbd.h#L164 |
@rajivr I have uploaded what I have so far (not much) if interested and invited you to be a collaborator: https://github.com/cr1901/tinyusb-sys. Let's discuss more on that repo (I won't be coding on it at the moment- my bandwidth is too thin- but happy to discuss). |
implemented by #194 |
Porting layer
Description
I do the vast majority of MSP430 programming in Rust nowadays. IMO it's actually easier to get a Rust toolchain set up than a C one. However, I still think non-ARM/non-32-bit support of tinyusb is worthwhile.
This would be the board I would port: http://www.ti.com/tool/MSP-EXP430F5529LP
The text was updated successfully, but these errors were encountered: