you should lock into this files https://github.com/f32c/f32c/blob/master/rtl/lattice/ulx2s_toplevel_sram.vhd https://github.com/f32c/f32c/blob/master/rtl/generic/glue_sdram.vhd https://github.com/f32c/f32c/blob/master/rtl/soc/sdram.vhd https://github.com/f32c/f32c/blob/master/rtl/soc/sram_pack.vhd or open an issue on git
This is response from one developer to you I've used it as transmitter to directly control remote 433 MHz relays and doors, currently I'm experimenting with hardware PID controller, intended use is for 3D printing Marko's students have used it for accelerometer data processing, driving displays, and general digital logic, many lab excercises and homeworks here's unofficial iomap IO MAP BASE: 0xFFFFF800 0x800-0x83F gpio0 32xI/O, 32xIRQ (6x4-byte, expandable to 16x4-byte) 0x840-0x87F gpio1 ... 0x880-0x8DF gpio2 0x8C0-0x8FF gpio3 0x900-0x97F timer0 2xPWM 2xICP (14x4-byte, expandable to 32x4-byte) 0x980-0x9FF timer1 ... 0xA00-0xA7F timer2 0xA80-0xAFF timer3 0xB00-0xB0F SIO0 RS232 (4-byte, expandable to 16-byte) 0xB10-0xB1F SIO1 ... 0xB20-0xB2F SIO2 ... 0xB30-0xB3F SIO3 ... 0xB40-0xB4F SPI0 (Flash) (2 byte, expandable to 16-byte) 0xB50-0xB4F SPI1 (MicroSD) 0xB60-0xB4F SPI2 user spi's 0xB70-0xB4F SPI3 ... 0xB80-0xB8F FB0 framebuffer composite (2-byte, expandable to 16-byte) 0xB90-0xB9F FB1 framebuffer VGA/HDMI 0xBA0-0xBAF PCM0 Audio DMA (11-byte, expandable to 16-byte) 0xBB0-0xBBF PCM1 ... 0xC00-0xC3F CAN0 (can bus 64-byte) 0xC40-0xC7F CAN1 ... 0xC80-0xCDF USB0 (usb bus 64-byte) 0xCC0-0xCFF USB1 ... 0xD00-0xDFF free (I2C, LEGO, 433MHz, 16-byte each) 0xD20 LEGO 0xD30 433 MHz 0xD40 PID 0xD50 PID 0xDD0 DDS 0xE00-0xE3F ETH0 (ethernet 64-byte) 0xE40-0xE7F ETH1 .. 0xF00-0xF03 BTN0 (simple input 16-byte, address -256) 0xF04-0xF07 BTN1 0xF08-0xF0D BTN2 0xF0C-0xF0F BTN3 0xF10-0xF13 LED0 (simple output 16-byte, address -240) 0xF14-0xF17 LED1 0xF18-0xF1D LED2 0xF1C-0xF1F LED3 0xFFFFFFFF the end
Hi, well the good news is that I got the processor working. The bad news is that couldn't get serial to work. Tried also to revert the USB_RX and USB_TX pins as defined in the project as you said they we're wrong. Still didn't work. Changed the speed to 19200 of course. I simply did: Code: >>> minicom -b 19200 -D /dev/ttyACM0 Correct? /K
But I have to concur, why is the speed only 19200? Seems reasonable to have it at least 115200 or maybe even higher.
Hi mistery, Thanks for the updates. It is very exciting to see things working out. We will share firmware with baud rate changed to 115200 in next couple of days. Thanks, Tom
Great, now you can upload arduino code I will try to write some tutorial how, becouse it is a bit harder becouse we do not have right speed. Great news Tom Yesterday I give Elbert V2 to main developer, and he manqage to start RISC-V on board and get fade led, but to do that he needed to remove serial, now he will try th cut RISC-V, and to bring serial back on the board.
And I forgot, yesterday I have added buttons, and switchesand tested it under arduino and all are working, the serial print is working to, today plan is to add gpios so I could try OLED display. This is in 4 pic-s what you need to do to uplad hex to mimas: http://www.lemilica.com/fpgarduino-numato-mimas-v2-spartan-6-fpga-development-board-ddr-sdram/
Great, it seems to work but I can not get the LED to blink. Also, if I try to use the serial port with Serial.begin(19200) the compilation fails. I think I will wait a few days until the 115200 FW is ready so that testing is a bit smoother. Then we can debug.
Ok, I have tried yesterday and it is working with Serial.begin(19200); I have tested serial, led, sw and deep sw
Just did the example SerialEvent with baudrate changed to 19200. Here is the output: Code: /home/magnus/.arduino15/packages/FPGArduino/tools/f32c-compiler/1.0.0/bin/mips-elf-ar rcs /tmp/build1860868207851946728.tmp/core.a /tmp/build1860868207851946728.tmp/UARTClass.cpp.o /home/magnus/.arduino15/packages/FPGArduino/tools/f32c-compiler/1.0.0/bin/mips-elf-ld -N -EL -gc-sections --library-path=/home/magnus/.arduino15/packages/FPGArduino/hardware/f32c/1.0.0/system/mips/lib -nostdlib --section-start=.init=0x400 -lcrt0 /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.o /tmp/build1860868207851946728.tmp/core.a -lulx2s -lm -lc -o /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.elf /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.o: In function `_GLOBAL__sub_I_inputString': mySerialEvent.cpp:(.text.startup._GLOBAL__sub_I_inputString+0x28): undefined reference to `__dso_handle' mySerialEvent.cpp:(.text.startup._GLOBAL__sub_I_inputString+0x2c): undefined reference to `__cxa_atexit' /tmp/build1860868207851946728.tmp/core.a(WString.cpp.o): In function `String::changeBuffer(unsigned int)': (.text._ZN6String12changeBufferEj+0x1c): undefined reference to `realloc' /home/magnus/.arduino15/packages/FPGArduino/tools/f32c-compiler/1.0.0/bin/mips-elf-ld: /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.elf: hidden symbol `__dso_handle' isn't defined /home/magnus/.arduino15/packages/FPGArduino/tools/f32c-compiler/1.0.0/bin/mips-elf-ld: final link failed: Bad value Error compiling.
Try this workaround maybee it helps put this line somewhere in your sketch. void* __dso_handle; this is from http://www.esp8266.com/viewtopic.php?p=13056
Getting further! Sorry, I don't have time to debug right now. Super busy with other stuff, will do more when time allows so just reporting for now. Code: /home/magnus/.arduino15/packages/FPGArduino/tools/f32c-compiler/1.0.0/bin/mips-elf-ld -N -EL -gc-sections --library-path=/home/magnus/.arduino15/packages/FPGArduino/hardware/f32c/1.0.0/system/mips/lib -nostdlib --section-start=.init=0x400 -lcrt0 /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.o /tmp/build1860868207851946728.tmp/core.a -lulx2s -lm -lc -o /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.elf /tmp/build1860868207851946728.tmp/mySerialEvent.cpp.o: In function `_GLOBAL__sub_I_inputString': mySerialEvent.cpp:(.text.startup._GLOBAL__sub_I_inputString+0x2c): undefined reference to `__cxa_atexit' /tmp/build1860868207851946728.tmp/core.a(WString.cpp.o): In function `String::changeBuffer(unsigned int)': (.text._ZN6String12changeBufferEj+0x1c): undefined reference to `realloc' Error compiling.
ok, I have opened Issue on git This is sample code I have used and it compiles ok Code: /* DigitalReadSerial Reads a digital input on pin 2, prints the result to the serial monitor This example code is in the public domain. */ // digital pin 2 has a pushbutton attached to it. Give it a name: int pushButton = 3; // the setup routine runs once when you press reset: void setup() { // initialize serial communication at 9600 bits per second: Serial.begin(19200); // make the pushbutton's pin an input: pinMode(pushButton, INPUT); } // the loop routine runs over and over again forever: void loop() { // read the input pin: int buttonState = digitalRead(pushButton); // print out the state of the button: Serial.println(buttonState); delay(1000); // delay in between reads for stability }
Your example compiles for me as well and uploads but there is no response from the serial terminal. I'm sure I had that working before. I will get back to you when I have some more time. LEDs are flashing in series of four and the upload script works. It seems in my example some string handling functions are missing or not referenced correctly. Code: String inputString = ""; // a string to hold incoming data boolean stringComplete = false; // whether the string is complete void* __dso_handle; void setup() { // initialize serial: Serial.begin(19200); // reserve 200 bytes for the inputString: inputString.reserve(200); } void loop() { // print the string when a newline arrives: if (stringComplete) { Serial.println(inputString); // clear the string: inputString = ""; stringComplete = false; } } /* SerialEvent occurs whenever a new data comes in the hardware serial RX. This routine is run between each time loop() runs, so using delay inside loop can delay response. Multiple bytes of data may be available. */ void serialEvent() { while (Serial.available()) { // get the new byte: char inChar = (char)Serial.read(); // add it to the inputString: inputString += inChar; // if the incoming character is a newline, set a flag // so the main loop can do something about it: if (inChar == '\n') { stringComplete = true; } } }
I have never used serial.Event();, but thanks for reporting this error it is now on git. Today I did some cleanup and opend repo with binary for Mimas, and arduino sample for testing. https://github.com/goran-mahovlic/f32c_extras now on Mimas all ports should work developers are working to support serialI2C, and I need to test softwareSPI implemented before
We have simplest RISC support ready for Elbert it has only 2 led outputs, and serial, but this firmware is not working, when i load a pic firmware, and then after resetting and removing jumper upload bin your UART test I do not have loopback, and mostly on new uploads I have SPISetIODirection faild... Configuration failed...