vonkonow / LEET-Modular

LEET modular is a versatile, easy to build, affordable and powerful generic eurorack module.
MIT License
45 stars 7 forks source link

Programming Help #2

Closed ehisforadam closed 1 year ago

ehisforadam commented 1 year ago

I'm not really familiar with how programming works for this type of board. I have done Arduino, but I am a bit over my head here. I have seen examples for this board that include a platformio.ini file. Visuaual studio also doesn't seem to want to open or import the files off this Github page unless I rename main.cpp to main.ino, then I can import it as an Ardunino project. It seems to load everything, but when I got to compile it I get this error: C:/Users/Adam/Documents/PlatformIO/Projects/230207-192426-sipeed-longan-nano/src/main.ino: In function 'void OnTimer()': C:/Users/Adam/Documents/PlatformIO/Projects/230207-192426-sipeed-longan-nano/src/main.ino:589:17: error: request for member 'delay' in 'delay', which is of non-class type 'void(long unsigned int)' 589 | tmp = delay.delay(ADC.anRaw[0], ADC.anAvg[4], ADC.anAvg[3]); // sample, mix, length

vonkonow commented 1 year ago

Hi I used Platform IO in visual studio code. In theory it is possible to use Arduino IDE, but I haven’t tried, and I don’t know if programming would work. Unfortunately, It is a bit tricky to program the first time, hopefully it is better today, but I remember spending some time googling, downloading and installing different USB drivers... Hope it helps, good luck!

ehisforadam commented 1 year ago

Maybe I wasn't being clear. I am using Platformio and I was able to get examples and other code loaded onto the Longan board. The trouble I was having was getting the LEET modular code to be loaded correctly into Platformio. I was able to get Platformio to load it in by changing main to *.ino I got that error within Platformio when compiling.

vonkonow commented 1 year ago

I didnt use arduino as framework in platform io. Here is the ini file I used: [env:sipeed-longan-nano] platform = gd32v board = sipeed-longan-nano framework = gd32vf103-sdk upload_protocol = dfu

ehisforadam commented 1 year ago

Oh hey, I think I got it to work. I had to replace the gd32vf103.h in the firmware folder and it compiled okay. Now to build the module up and see if she works. File location: C:\Users\Adam.platformio\packages\framework-gd32vf103-sdk\GD32VF103_standard_peripheral
New file: https://github.com/riscv-mcu/GD32VF103_Firmware_Library/blob/master/Firmware/GD32VF103_standard_peripheral/gd32vf103.h

ehisforadam commented 1 year ago

Everything is together and working!

vonkonow commented 1 year ago

Now that you mention it, I recall that I did the same procedure years ago. Strange that they still haven’t fixed it... Anyway, glad that you got it working – well done :)