Repository navigation
Replies: 2 comments
0 replies
|
There is also this C program to set the memory split: https://github.com/cnlohr/ch32fun/tree/master/examples_v30x/set_memory_split |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

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:
All reactions