Coder Social home page Coder Social logo

Comments (10)

r1cebank avatar r1cebank commented on September 24, 2024

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.

BrunoLevy avatar BrunoLevy commented on September 24, 2024

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.

r1cebank avatar r1cebank commented on September 24, 2024

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.

BrunoLevy avatar BrunoLevy commented on September 24, 2024

There could be several reasons:

from learn-fpga.

r1cebank avatar r1cebank commented on September 24, 2024

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.

BrunoLevy avatar BrunoLevy commented on September 24, 2024

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.

Mecrisp avatar Mecrisp commented on September 24, 2024

Maybe try to toggle DTR which is connected to reset line?

from learn-fpga.

BrunoLevy avatar BrunoLevy commented on September 24, 2024

miniterm --dtr=0 ttyUSB0 115200 maybe ?

from learn-fpga.

r1cebank avatar r1cebank commented on September 24, 2024

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.

wohlbier avatar wohlbier commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.