You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am implementing a streamer for a webradio, and I think the ch32kv307 or similar could be a good place to start, given it's native i2s interface at 96Khz and the Ethernet port and stack. In this crate there was almost anything developed so I look around for working c example to transpile.
I've succesfully transpiled an implementation of raw mac packets for eth_driver_10M, and it is working perfectly on my ch32v307VCT6 dev board.
Then I abstract away some complexity by wrapping the unsafe c calls in a driver for embassy_net, and I was able to correctly setup dhcp, dns, and basic tcp client super easy.
In the following months I will be polishing the raw c APIs in order to make it more rusty, and I will make a pull request on this crate.
But before I would like to implement a complete implementation of a webradio client, so that if I would brake anything simply the stream will stop working at all.
I succesfully connected, made an http handshake and starting receiving raw mp3 frames. But here goes the problem:
When i add the decode call of nanomp3, Simply the executable stops working at all. It looks like stack overflow, and given an example with only the decoder and not much more is using 47KB of stack memory only to instantiate the decoder.
But this chips have a configurable amount of sRAM, and in theory there should be a way to compile and run the code with 128KB of RAM and 192KB of flash. But I wasn't able to do that.
To recap:
In order to add the ETH abstraction to ch32-metapac I simply make a pull request there? or are there other repos around?
does anyone know how/has already done a project which uses lot's of stack memory? how to configure the 128KB mode?
does anyone want to help to translate the raw c transpiled code to nice clean rust?
Could the webradio example be a good example to be added to the examples folder? or is better an easier implementation?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am implementing a streamer for a webradio, and I think the ch32kv307 or similar could be a good place to start, given it's native i2s interface at 96Khz and the Ethernet port and stack. In this crate there was almost anything developed so I look around for working c example to transpile.
I've succesfully transpiled an implementation of raw mac packets for eth_driver_10M, and it is working perfectly on my ch32v307VCT6 dev board.
Then I abstract away some complexity by wrapping the unsafe c calls in a driver for embassy_net, and I was able to correctly setup dhcp, dns, and basic tcp client super easy.
In the following months I will be polishing the raw c APIs in order to make it more rusty, and I will make a pull request on this crate.
But before I would like to implement a complete implementation of a webradio client, so that if I would brake anything simply the stream will stop working at all.
I succesfully connected, made an http handshake and starting receiving raw mp3 frames. But here goes the problem:
When i add the decode call of nanomp3, Simply the executable stops working at all. It looks like stack overflow, and given an example with only the decoder and not much more is using 47KB of stack memory only to instantiate the decoder.
But this chips have a configurable amount of sRAM, and in theory there should be a way to compile and run the code with 128KB of RAM and 192KB of flash. But I wasn't able to do that.
To recap:
Beta Was this translation helpful? Give feedback.
All reactions