Comments (10)
Here is the source code for my test program, the LED blinks but no output in the serial console
#include <femtorv32.h>
int main() {
while(1) {
printf("Hello world !!\n Let me introduce myself, I am FemtoRV32, one of the smallest RISC-V cores\n");
printf("Freq: %d MHz\n", FEMTORV32_FREQ);
delay(500);
*(volatile uint32_t*)(0x400004) = 3;
delay(500);
*(volatile uint32_t*)(0x400004) = 0;
}
return 0;
}
from learn-fpga.
Hello,
Your configuration and program looks correct to me,
Which commands did you run ?
For running the example:
$ cd FemtoRV
$ make IceStick (this will synthesize and send the bitstream to the device)
$ cd FIRMWARE/EXAMPLES
$ make hello.prog (this will compile the program and send the binary to SPI flash)
$ cd ../../
$ make terminal (or use your favorite terminal emulator, at 115200 bauds)
Hope this helps,
Best,
-- Bruno
from learn-fpga.
Hello, thanks for the quick reply.
Yes, thats the commands i used to build the core and the program. The LED works but nothing is printed on the serial USB
from learn-fpga.
There could be several reasons:
- check which device is used (ttyUSB0, ttyUSB1, ....) by plugging the device then
$ dmesg
- try different terminal emulators
- try https://github.com/BrunoLevy/learn-fpga/tree/master/FemtoRV/TUTORIALS/FROM_BLINKER_TO_RISCV
(step18:$ BOARDS/run_icestick.sh step18.v
thenterminal.sh
)
from learn-fpga.
Hi, I've already checked the device for the icestick and made sure I am using the correct one ttyUSB1
, the terminal emulators I've tried are screen
picocom
.
I tried running step18.v
as instructed, and check the serial output, the LED blinks rapidly for a while and goes off but nothing is printed in the terminal.
Thanks
from learn-fpga.
I don't have any other idea. Just in case, I'd try with ttyUSB0
and ttyUSB2
(but you probably tryed already...)
Could be also a question of permissions ? Or udev rules ? (but obviously programming the device works, so probably not).
from learn-fpga.
Maybe try to toggle DTR which is connected to reset line?
from learn-fpga.
miniterm --dtr=0 ttyUSB0 115200
maybe ?
from learn-fpga.
Thanks for the sugesstions, I've tried miniterm --dtr=0 ttyUSB0 11520
as well since its one of the option in the Makefile. I'll do some my own digging.
from learn-fpga.
Hi @r1cebank did you get this to work? For step 17 I'm seeing question marks written to the terminal. Is it supposed to be text?
edit: I'm seeing this for step 17. I'll try running step 18.
edit 2: for 18 I'm seeing what I think is correct. For step 17 I'm still not sure if I should be seeing letters like I do when running the simulation.
edit 3: I fixed my problem. I didn't have all of the necessary code in my implementation.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##################@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@#########################@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@###############################@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@###################################@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@#######################################@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@##########################################@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@#############################################@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@################################################@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@###################################################@@@@@@@@@@@@@@
@@@@@@@@@@@@@@#####################################################@@@@@@@@@@@@@
@@@@@@@@@@@@@#######################################################@@@@@@@@@@@@
@@@@@@@@@@@@#########################################################@@@@@@@@@@@
@@@@@@@@@@@###########################################################@@@@@@@@@@
@@@@@@@@@@###############%%%%%%%%%%%###################################@@@@@@@@@
@@@@@@@@@############%%%%%%%%%%%%%%%%%%%################################@@@@@@@@
@@@@@@@@@#########%%%%%%%%%%%%%%%%%%%%%%%%%##############################@@@@@@@
@@@@@@@@########%%%%%%%%%%%%%%%%%xxxxxxxx%%%%%###########################@@@@@@@
@@@@@@@#######%%%%%%%%%%%%%%%%%xxxxo ooxxx%%%%###########################@@@@@@
@@@@@@@#####%%%%%%%%%%%%%%%%%xxxxxo;: ;;oxxxx%%%%##########################@@@@@
@@@@@@#####%%%%%%%%%%%%%%%%xxxxxxoo;: . oxxxx%%%%#########################@@@@@
@@@@@#####%%%%%%%%%%%%%%%%xxxxxxooo;: :;oxxxx%%%%%########################@@@@
@@@@@###%%%%%%%%%%%%%%%%xxxxxxxooo;:. ,;ooxxxx%%%%%#######################@@@@
@@@@###%%%%%%%%%%%%%%%%xxxxxxxooo;, ,oooxxxx%%%%%#######################@@@
@@@@###%%%%%%%%%%%%%%%xxxxxxxoo;;:, .;ooooxx%%%%%%######################@@@
@@@###%%%%%%%%%%%%%%%xxxxxxxo;;;::, ,:;;oooxx%%%%%#######################@@
@@@##%%%%%%%%%%%%%%%xxxxxxoo:,,,,. ,:;;;:oxx%%%%%######################@@
@@@#%%%%%%%%%%%%%%xxxxxooo;: . ,,: :ox%%%%%%######################@
@@##%%%%%%%%%%%%%xxxxoooo;;: oxx%%%%%######################@
@@#%%%%%%%%%%%%%xxoooooo;;;,. ;ox%%%%%%#####################@
@@#%%%%%%%%%%%xxooooooo;;;: :;ox%%%%%%%#####################
@@%%%%%%%%%%xxo;;;oooo;;;: ,;oxx%%%%%%#####################
@#%%%%%%%xxxxo: :::::::::, oxx%%%%%%#####################
@#%%%%xxxxxoo;: .,, ,:,,. ;xx%%%%%%%####################
@%%%xxxxxxooo;: .. .;xxx%%%%%%####################
@%%xxxxxxoooo;:. .;xxx%%%%%%####################
@%xxxxxxoooo;:, oxxx%%%%%%####################
@xxxxxxoooo;.. :oxxx%%%%%%%###################
@xxxxxo;;;:, ;oxxx%%%%%%%###################
@oo;;::;:::. :;oxxx%%%%%%%###################
%,,. .:;oxxx%%%%%%%###################
@o;;:.::,,. :;oxxx%%%%%%%###################
@xxxxx;;;::, .;oxxx%%%%%%%###################
@xxxxxxoo;;: . :oxxx%%%%%%%###################
@%xxxxxxoooo::. ,oxxx%%%%%%####################
@%%xxxxxxoooo::. ;xxx%%%%%%####################
@%%%xxxxxxooo;:. ,;xxx%%%%%%####################
@%%%%xxxxxxoo;: . .,,, ;xx%%%%%%%####################
@#%%%%%%xxxxoo: ,::,,::::, ;xx%%%%%%#####################
@#%%%%%%%%%xxx;;;;;oo;;;:, ,:oxx%%%%%%#####################
@@#%%%%%%%%%%xxxooooooo;;;. :;oxx%%%%%%#####################
@@#%%%%%%%%%%%%xxxoooooo;;:, .;ox%%%%%%#####################@
@@##%%%%%%%%%%%%%xxxooooo;;: ;ox%%%%%%#####################@
@@@#%%%%%%%%%%%%%%xxxxxooo;: .,. ,ox%%%%%%######################@
@@@##%%%%%%%%%%%%%%xxxxxxoo; . ,. . :;:,;xx%%%%%######################@@
@@@###%%%%%%%%%%%%%%xxxxxxxoo;;;::. .:;;;ooxx%%%%%%######################@@
@@@@##%%%%%%%%%%%%%%%%xxxxxxxo;;;:, .:;oooxxx%%%%%#######################@@
@@@@###%%%%%%%%%%%%%%%%xxxxxxxooo;. ,;oooxxx%%%%%#######################@@@
@@@@@###%%%%%%%%%%%%%%%%xxxxxxxooo;, ,;ooxxxx%%%%%########################@@@
@@@@@####%%%%%%%%%%%%%%%%xxxxxxxooo:, :;oxxxx%%%%%########################@@@@
@@@@@@####%%%%%%%%%%%%%%%%%xxxxxxoo;:. ,oxxxx%%%%%#########################@@@@
@@@@@@######%%%%%%%%%%%%%%%%xxxxxxo;: :;:xxxx%%%%##########################@@@@@
@@@@@@@######%%%%%%%%%%%%%%%%%xxxxxo,,;oxxxx%%%%##########################@@@@@@
@@@@@@@@#######%%%%%%%%%%%%%%%%%xxxxoooxxx%%%%############################@@@@@@
@@@@@@@@#########%%%%%%%%%%%%%%%%%%%%%%%%%%%#############################@@@@@@@
@@@@@@@@@###########%%%%%%%%%%%%%%%%%%%%%###############################@@@@@@@@
@@@@@@@@@@##############%%%%%%%%%%%%%%#################################@@@@@@@@@
@@@@@@@@@@@############################################################@@@@@@@@@
@@@@@@@@@@@@##########################################################@@@@@@@@@@
@@@@@@@@@@@@@########################################################@@@@@@@@@@@
@@@@@@@@@@@@@@######################################################@@@@@@@@@@@@
@@@@@@@@@@@@@@@###################################################@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@#################################################@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@##############################################@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@###########################################@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@########################################@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@####################################@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@################################@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@###########################@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#####################@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
from learn-fpga.
Related Issues (20)
- From Blinky to RiscV - porting to other HDLs
- Interrupt handling, double triggering HOT 2
- Rv32i quark Block diagram HOT 4
- Out of memory while generating hex for blinky in step 20, IceStick HOT 3
- Icebreaker FPGA UART communication garbage out HOT 4
- Issue connecting iCEstick Evaluation Kit
- Building radiona_ulx3s_ex fails but the original LiteX python script works (ULX3s-12F) HOT 1
- comment/code mismatch
- broken link HOT 1
- FROM_BLINKER_TO_RISCV step 14 multiply simulates but doesn't run on IceStick
- comment/code mismatch FROM_BLINKER_TO_RISCV step 4 (?) HOT 1
- ice-sugar-nano: PLL avaliable but unused
- Step 7 Yields No Output HOT 15
- FROM_BLINKER_TO_RISCV: step 19: verilator command does not work. HOT 2
- FROM_BLINKER_TO_RISCV: no terminal output for step22.v on iCEstick HOT 14
- Which linker script should I be using with the ULX3S? HOT 2
- How to fit larger programs on the Icestick ULXS3 or Arty HOT 1
- Error when running make ARTY HOT 7
- Why does make hello.prog use iceprog after running make ARTY.firmware_config? HOT 1
- Struggling to make LiteOS HOT 31
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from learn-fpga.