-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update GPIO driver #246
Merged
Merged
update GPIO driver #246
Changes from 15 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
0782ff7
add code structure
3287b93
Merge branch 'main' into gpios
4c13714
Adding gpio functionalities
Ho3eintaji e2cd233
Merge branch 'main' into gpios
8325361
Merge branch 'gpios' of github.com:Ho3eintaji/x-heep into gpios
e75d77b
removing pre version from code
b0d6810
Merge branch 'main' into gpios
1c336d5
removing some bugs of function definition
873a93f
solving the bug on gpio_reset, and updating example_gpio_cnt
0d289a5
removing mmio header
4c87803
easily configuration of pins by gpio_config
6436e16
adding MAX_PIN
267f99c
example_power_gating_corewas updated
b8260df
updating gpio_pmw
da57c41
updating blinky_freertos
d4878dc
removing left comments
017f8fc
removing run.sh
292f6e7
Merge branch 'main' into gpios
d299e2b
bitfield modification, removing magic numbers
83e9e91
adding max pin to xheep.h
2532fb8
Merge branch 'main' into gpios
128ab63
gpio_toggle bug was solved
dc3683f
adding error types
e3b1106
Merge branch 'main' into gpios
7a62e52
Resolved merge conflict by new updates of rplic which were using prev…
4583c7c
some minor modifications
8f060ab
trim code
5487b8a
solving conflict with main
85cc508
blinky_freertos bug
825c599
resolving the conflict with example_power_gating_core
3530a72
Merge branch 'esl-epfl:main' into gpios
JoseCalero 09d1d50
Merged gpio hal refactoring and main. Bug pending on freertos blinky
JuanSapriza a0a4861
Updated the GPIOS being used for the LED5
JuanSapriza 783c152
Merge branch 'main' into pr_gpios
JuanSapriza 74fd1d8
Merged main into pr_gpios
JuanSapriza 2cd850e
removed unnecessary comments
JuanSapriza File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,5 @@ sw/device/lib/drivers/**/*_structs.h | |
|
||
# openroad | ||
flow/OpenROAD-flow-scripts | ||
|
||
run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#! usr/bin/bash# This script is to be run in the x-heep base directory (aka BASE) | ||
# It takes only one argument: the application name. | ||
# It takes for granted that myApplication.c is located in | ||
# BASE/sw/applications/myApplication/# Run this script from the BASE with | ||
# $ sudo bash pynq-run <name-of-your-app># The pynq-z2 board must be | ||
# - Powered | ||
# - Loaded with the appropriate bitstream (use vivado) | ||
# - Connected to the EPFL programmer | ||
# - With sw1=0(outside) and sw0=1(inside) | ||
#echo Will build for $1 | ||
echo Will run application $1 | ||
|
||
make app-clean | ||
# Compile and build the binaries to be loaded in the flash. | ||
# To use different LINKER options, just modify this script. | ||
# (remember to also change the make flash-load command below) | ||
make app PROJECT=$1 LINKER=flash_load TARGET=pynq-z2 | ||
|
||
|
||
|
||
# To use the iceprog | ||
|
||
( cd sw/vendor/yosyshq_icestorm/iceprog && make clean && make all) | ||
|
||
# Make and load the flash programmable binary into the iceprog | ||
make flash-prog && | ||
# Open picocom to communicate with the board through UART | ||
picocom -b 115200 -r -l --imap lfcrlf /dev/ttyUSB2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the I2S was introduced, it was decided to use GPIOs 20-22 (because they were the last ones).
These were already mapped to the RGB LED5, so they were re-mapped so that GPIOs 15-17 were assigned instead (in the
pin_assign.xdc
).This change was never reflected in the
example_freertos_blinky
, which continued to use GPIOs 20-22.The only change needed for it to work is to change the
#define GPIO_LD5_* xx
to their proper numbers.There is no mux to change, as I2S and LED5 go to different pins in the FPGA board.
I will make a PR to this branch with this change and a merge of main.