Git Product home page Git Product logo

caravel_board's People

Contributors

aidan-mcnay avatar dan-fritchman avatar jeffdi avatar marwaneltoukhy avatar mattvenn avatar mbalestrini avatar mguthaus avatar mkkassem avatar mwelling avatar passant5 avatar proppy avatar rtimothyedwards avatar saraefabless avatar shalan avatar thesourcerer8 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

caravel_board's Issues

simulator is failing with NUM_IO

Traceback (most recent call last):
  File "gpio_config_simulator.py", line 13, in <module>
    from gpio_config_def_example import H_NONE, H_DEPENDENT, H_INDEPENDENT, H_SPECIAL, gpio_h, gpio_l, NUM_IO
ImportError: cannot import name 'NUM_IO' from 'gpio_config_def_example' (/home/matt/work/asic-workshop/shuttle2/caravel_board/firmware_vex/gpio_config/gpio_config_def_example.py)

path to the USB device should not be hardcoded

currently path the usb device is hardcoded in https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/Makefile#L5 which seems to use a path specific to a macosx installation.

On Linux based operating system, the path is likely to be different (/dev/ttyACM0, /dev/ttyUSB0) so something that detect the nucleo board is probably desirable:

(env) nucleo πŸ‘Ή mpremote connect list
/dev/ttyACM0 066AFF495087534867055928 0483:374b STMicroelectronics STM32 STLink
/dev/ttyS0 None 0000:0000 None None

all usb/serial connection should be documented

It seems that there are three possible USB/UART connection on the nucleo board + hat combo:

  • nucleo's CN1
  • nucleo's CN13
  • hat's J1
  • hat's J4

It would be nice if each port had some documentation about what it can be used for.

Caravel harness orientation

I have received chips from MPW2 run. I wanted to know the orientation for bonding the chips onto the white caravel board. Pg 27 on [caravel datasheet] does have the wiring diagram. But it just says view from top and in absence of any identification mark like notch, is tough to distinguish say between A1 and F10.
image

@msaligane

dev-v5-M.2 component part numbers

I'm trying to order
https://github.com/efabless/caravel_board/tree/main/hardware/caravel-dev-v5-M.2
using
https://github.com/pcbway/PCBWay-Plug-in-for-Kicad

"with the current files, Anson can only exported the centroid file, but imcomplete BOM file, because when you design the file in Kicard, you did not upload the component part number, so we cannot quote, attached is the file exported, we need you to provide each part number.
https://member.pcbway.com/Message/MessageDetail?ParentId=3087836
(likely private, for my reference.)

I did not see a part number for the connector. That is the only thing I checked.

Makefile should not mess up with the $PATH

This currently break integration with currently activated venv or conda environment:

$ python3 -m venv env
$ source env/bin/activate
$ python -m pip install mpremote
$ cd firmware_vex/nucleo/
$ make run
mpremote connect /dev/cu.usbmodem34203 exec "import machine; machine.reset()"
/bin/sh: 1: mpremote: not found

If you remove the line at https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/Makefile#L2 it works as expected (mpremote get resolve from the currently activated environment).

Error during nucleo board reset

I've installed mpremote and specified the correct device. I get the following result:

mpremote connect /dev/ttyACM0
Connected to MicroPython at /dev/ttyACM0
Use Ctrl-] to exit this shell
>>> import machine
>>> machine.reset()
Traceback (most recent call last):
  File "main.py", line 1
SyntaxError: invalid syntax
MicroPython v1.19.1-616-g5987130af-dirty on 2022-11-20; NUCLEO-F746ZG with STM32F746
Type "help()" for more information.
>>>

After the reset, the User LD1 and LD2 on the nucleo board flash green and blue respectively in an alternating sequence three times.

I do not see any "green and red leds" as specified in the README.

io_config control should give back control to the micropython interpreter

currently the io_config test finish by a busy loop to blink the onboard LED in order to convey the status to the user:
https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/io_config.py#L354-L362

It would be nice to rely instead on timer (if available on the nucleo port): https://docs.micropython.org/en/latest/pyboard/tutorial/timer.html?highlight=timer so that you can give control back to the main interpreter (without requiring the user to interrupt the script).

`make run` should provide informative error messages

Thje current diagnosis is simply running machine.reset():
https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/Makefile#L64
and doesn't produce any output.

(env) nucleo 🍑 make run
mpremote connect /dev/ttyACM0 exec "import machine; machine.reset()"
MicroPython v1.19.1-616-g5987130af-dirty on 2022-11-20; NUCLEO-F746ZG with STM32F746
Type "help()" for more information.
>>> 

and display a led combination that's not documented in the accompanying paper note (twe red leds, no blinking):
image

Flexy pins socket on caravel development boards

Dealing with the Flexy pins as a socket for the caravel breakout boards is not that great and the following are reported issues by the community:

  1. Flexy pins are hard to install and solder on the Caravel main board
  2. Flexy pins are fragile and get bent easily
  3. Plugging in the Caravel breakout board requires a firm press that might break the flexy pins
  4. Attaching the Caravel Nucleo hat board to the Nucleo all the way bends the flexy pins and they get shorted with the jumpers on the Nucleo

Another socket is required to avoid this bad experience with the upcoming boards

ValueError: incompatible .mpy file

Getting the following error when do make run.
ayushman_ubuntu@UbuntuLTS:~/caravel_board/firmware_vex/nucleo$ make run
mpremote connect /dev/ttyACM0 exec "import machine; machine.reset()"
Traceback (most recent call last):
File "main.py", line 2, in
File "io_config.py", line 1, in
File "nucleo_api.py", line 3, in
ValueError: incompatible .mpy file
MicroPython v1.19.1-616-g5987130af-dirty on 2022-11-20; NUCLEO-F746ZG with STM32F746

Type "help()" for more information.

@msaligane

caravel procurement

I'd like a few of these boards (less than 10), I'm assuming I have to get them manufactured and assembled myself.
What company was used?

Is there some way to reference the previous run so I can ask for "more of that" ?

I did not have a chip made, so I'm not eligible for anything that participants are, but I was given some of the chips to experiment with.

risc-v toolchain requirement should be documented

When using the risc-v toolchain from debian:

ii  gcc-riscv64-unknown-elf                              12.1.0-7+11                                             amd64        GCC cross compiler for Risc-V processors

I get the following error when trying to compile some of the test firmware of the repo:

riscv64-unknown-elf-gcc -I/home/proppy/src/github.com/efabless/caravel_board/firmware_vex/gpio_test -I../ -I../generated/ -O0 -mabi=ilp32 -march=rv32i -D__vexriscv__ -Wl,-Bstatic,-T,../sections.lds,--strip-debug -ffreestanding -nostdlib -o gpio_test.elf ../crt0_vex.S ../isr.c gpio_test.c
../crt0_vex.S: Assembler messages:
../crt0_vex.S:59: Error: unrecognized opcode `csrw mtvec,a0', extension `zicsr' required
../crt0_vex.S:87: Error: unrecognized opcode `csrw mie,a0', extension `zicsr' required
../irq_vex.h: Assembler messages:
../irq_vex.h:31: Error: unrecognized opcode `csrw 3008,a5', extension `zicsr' required
make: *** [Makefile:30: gpio_test.elf] Error 1

It would be nice to document the toolchain requirements and guide the user thru the required setup.

GPIO0 missing

The io_config.py doesn't check for GPIO#0 , it starts with GPIO#1:

*** flashing Caravel
gpio[1] >> Passed

but in the end it claims that gpio#0 is ok:
== LOW chain FAILED. Valid IO = 0 thur 14. ==

Read Compare Failed

Hello,

While trying to flash the mpw2 with any example(such as blink) read compare always fails.
I guess there is an alignment problem while writing or reading or both.
Could you please check that issue?

Best.

UART function definitions are missing

It seems that definitions of the function declarations in uart.h are missing in firmware_vex:

#ifndef __UART_H
#define __UART_H

#ifdef __cplusplus
extern "C" {
#endif

#define UART_EV_TX	0x1
#define UART_EV_RX	0x2

void uart_init(void);
void uart_isr(void);
void uart_sync(void);

void uart_write(char c);
char uart_read(void);
int uart_read_nonblock(void);

#ifdef __cplusplus
}
#endif

#endif

config builder doesn't work as expected

when I run Make, it will build the required gpio_config_data.c, but not from the local gpio_config_[io|def].py

https://github.com/efabless/caravel_board/blob/main/firmware_vex/matt_test/Makefile#L19

that's because the config builder includes local example python libs

from gpio_config_def_example import *

I fixed this by modifying the builder to include the real files, and then copied it into the firmware directory so that it picks up the local files.

I suggest adding command line arguments to explicitly pass the configs to read, and then the makefile can call it from the original position, but use local files. The local files could also be automatically passed to the builder through make rules.

expose all mprj_io pins in the micropython HAL

Slightly related to #65, but assuming we're using the default micropython firmware it seems that only a subset of the caravel mprj_io are exposed in the micropython HAL (despite all of them being physically connected to CN11 and CN12):
https://github.com/micropython/micropython/blob/05bb26010e4a466a82cfed179f8d8d0b406a78ca/ports/stm32/boards/NUCLEO_F746ZG/pins.csv

We should make sure that all of those are expose to the micropython environment, so that people can poke at their design directly from the micropython REPL.

auto detect correct serial port for repl and flashing

there is too much room for error with the makefiles and mount points

perhaps mount points stay the same but it's very common for the serial ports to change names, especially as I have to unplug and replug the board every time I try to use it

so better to detect which is the correct port and set it automatically

Winbond SRAM not found

Hi,

I am getting the following error when I run the IO diagnostic test given in the README.
image

Does anyone have any idea why this is the case and how to go about solving it
@msaligane

Thanks
Ayushman

all possible led blinking patterns should be correctly documented

Looking at the test being performed there seems to be multiple possible results of the GPIO characterization

ID LOW HIGH
A PASS PASS
B PASS PARTIAL
C PASS FAIL
D PARTIAL PASS
E PARTIAL PARTIAL
F PARTIAL FAIL
G FAIL PASS
H FAIL PARTIAL
I FAIL FAIL

Looking at https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/README.md?plain=1#L62-L66 it seems that only 3 patterns are documented: A, (B or C), (D or G)

ID LOW HIGH GREEN RED
A PASS PASS 2 short + 4 long off
B or C PASS PARTIAL or FAIL 2 short 2 long
D or G PARTIAL or FAIL PASS 2 short 4 long

And looking at https://github.com/efabless/caravel_board/blob/main/firmware_vex/nucleo/io_config.py#L354-L362 it seems that only 3 blinking modes are actually implemented with different patterns than the one documented:

ID LOW HIGH GREEN RED
A PASS PASS 2 short + 4 long off
B or C PASS PARTIAL or FAIL 2 long 2 short
D or E or F oe G or H or I PARTIAL or FAIL PASS or PARTIAL or FAIL 4 long 2 short

`docs/caravel_datasheet.pdf` says PicoRV32

The datasheet @ https://github.com/efabless/caravel_board/blob/main/docs/caravel_datasheet.pdf says;

The Caravel harness comprises a small RISC-V microprocessor based on the simple 2-cycle PicoRV32 RISC-V core implementing the RV32IMC instruction set (see http://riscv.org/).

The processor core is the PicoRV32 design (see http://github.com/cliffordwolf/picorv32). The full core description is available from the github site. The hardware implementation is the β€œlarge” variant, incorporating options IRQ, MUL, DIV, BARREL_SHIFTER, and COMPRESSED_ISA (16-bit instructions).

I'm guessing this is all wrong?

external power supply should be documented

Looking at the nucleo board datasheet:
https://www.st.com/resource/en/user_manual/um1974-stm32-nucleo144-boards-mb1137-stmicroelectronics.pdf

It seems that:

In case the maximum current consumption of the STM32 Nucleo-144 board and its shield
boards exceeds 300 mA, it is mandatory to power the STM32 Nucleo-144 board with an
external power supply connected to E5V, VIN or +3.3 V.

I wonder if the data corruption #20 and flashing reliability issues #19 #16 could be related to this?

It would be nice to document the external power supply options:

  • Vin
  • E5V
  • 3.3V thru hat

As well as some power profiling of the hat + nucleo board in action during IO configuration to assert that firmware changes don't exceed the power supply budget.

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.