… I’ll let people familiar with embedded dev to address your remarks ;-)
Fabien Chouteau
@Fabien-Chouteau
Hi @frank_buss_twitter ! We improved a lot
Frank Buss
@frank_buss_twitter
you mean it was even worse? :-)
Fabien Chouteau
@Fabien-Chouteau
Yes, and we know we still have a long way to go. Supporting the gazillion variants of STM32 is not a simple challange to address.
Frank Buss
@frank_buss_twitter
Maybe you can generate it all from the CubeMX files? If you have installed it, take a look at C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeMX\db\mcu, all clear text XML files with all the differences. Of course, the best would be to have just another target, "Ada", in the CubeMX settings, much like there is a target for TrueStudio, MDK-ARM etc. Unfortunately looks like CubeMX is not open source, and might be difficult to add an Ada target, because I assume there are lots of hardcoded C stuff in it.
Fabien Chouteau
@Fabien-Chouteau
Generation from the XML files is something we will have a look at.
For the Ada_Drivers_Library library itself you should be able to use the support available in the srm32f4_disco
Hi Fabien, I have some trouble to Mount the SD card volume on my stm32f769-disco, I sent you an email with detailed tests I have done, do you think I should open an issue on git? Let me know please, thank you in advance.
Frank Buss
@FrankBuss
When I use the runtime ravenscar-full-stm32f4, the line "delay until Clock + Microseconds (200);" in stm32-board.adb hangs, but looks like it works for STM32F407_Discovery'Runtime ("Ada");. Unfortunately I can't use the latter, because I need streams, exceptions etc. Am I using the right runtime for full ravenscare? Or any idea how to fix it or where I can look to fix it myself?
Fabien Chouteau
@Fabien-Chouteau
@FrankBuss Did you clean the project and recompile everything after you changed the run-time?
Btw, the debugger doesn't work well on my PC (Debian Linux 64 bit). Very slow, like 10 seconds to load all the symbols on start, 1-2 seconds for single steps, and crashes sometimes, together with GPS.
I have a 4 GHz Intel I7, 32 GB RAM, not much else running, other programs are very fast, like the Keil uVision debugger for the same board, even inside a Windows VM.
Fabien Chouteau
@Fabien-Chouteau
It's not a CPU or RAM problem. The slow binary load comes from the st-link probe and driver. My guess is that there's a bottle neck in the USB communication, but since ST is not very open about the st-link probes firmware and all we have is a reverse engineered driver for it, I don't see how to improve the situation.
On the other hand they do provide the st-link probe effectively for free which is nice.
Frank Buss
@FrankBuss
ok, yeah, I noticed "Transfer rate: 24 KB/sec" in the debugger window, not light speed :-)
_
Fabien Chouteau
@Fabien-Chouteau
Ok, so I don't see any problem with the delay. But there's an exception in your code:
Unhandled Ada Exception: CONSTRAINT_ERROR
Message: ada_synth.adb:70 range check failed
It comes from here: Integer_16 (I * 432452) + Int_Sample;
Frank Buss
@FrankBuss
yes, this was for testing
strange, it doesn't work here when I use the delays, maybe something wrong how I compiled it? I clicked the "Build Target Build All" button in GPS
Fabien Chouteau
@Fabien-Chouteau
If I comment this line and uncomment the one above. The program runs and I can hear a tone from the audio jack...
Frank Buss
@FrankBuss
Ok, works here now too with the delays. I guess I tested it in my dirty build environment with mixed runtimes, then checked out it cleanly and didn't noticed the exception.
I can see the exection kind of in the st-util window, 2 characters per line, how do so see this nice output?
image how much easier it is to play your noise maker with a real piano :-)
Fabien Chouteau
@Fabien-Chouteau
It's on the roadmap :)
Manuel A.Iglesias A.
@miabbate_twitter
The ST-Link doesn't support SWO, it uses semihosting, which happen to be very slow, so basically the advice is that don't use for code that is time sensitive and in short it sucks. The idea would be to upgrade the ST-Link with Segger which is now possible but I am not sure if it can use SWO since it needs the physical pin to output the serial data. If you want to solve at least the ugly output use openocd instead of st-link debugger. Also the debugger of gps suffer when you start inspecting variables and memory, suddenly hangs or even needs a reset . BY the way I am not seeing where it's stated that the deadline has been moved!
Frank Buss
@FrankBuss
it was an eMail: "you will now have until Monday 18th 23:59"
Frank Buss
@FrankBuss
MIDI-in is working now: https://github.com/FrankBuss/Ada_Synth @Fabien-Chouteau if you have a digital 3 V MIDI signal and a MIDI piano, you could now play music on it. But I added a nice automatic startup chord at reset as well :-) Tomorrow the fun part starts, implementing polyphonic audio, changing the generator parameters with the knobs etc.
Fabien Chouteau
@Fabien-Chouteau
:+1:
@miabbate_twitter did you make progress on the filesystem?
Manuel A.Iglesias A.
@miabbate_twitter
HI Fabien, actually not, the problem exists, even after changing the block read size to 512, it's weird since sometimes if I run the code with breakpoints the Mount_Volume returns ok, otherwise it returns no_filesystem, so I end up giving up for now :(
Fabien Chouteau
@Fabien-Chouteau
Too bad. But you already have a great project anyway :thumbsup:
Manuel A.Iglesias A.
@miabbate_twitter
Three more days was too little deadline extension to make it work, actually It took me two days to document everything, instead I am working to have dns addition to ipstack as a bonus bogus ;)
Frank Buss
@FrankBuss
@miabbate_twitter do you have a link to your project page? My MIDI synthesizer is now done, still missing polyphonic sound, but this should be easy to implement http://www.makewithada.org/entry/midisynthesizer
Are there many entries for this competition? I think it is a bit rough for newbies like me to learn Ada, learn how to use the IDE, learn the STM32 libraries API etc. A full tutorial might be useful.