-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #360 from Paciente8159/rp2040
RP2040
- Loading branch information
Showing
40 changed files
with
2,859 additions
and
213 deletions.
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
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
Name: boardmap_rp_pico_w.h | ||
Description: Contains all MCU and PIN definitions for Raspberry Pi Pico W to run µCNC. | ||
Copyright: Copyright (c) João Martins | ||
Author: João Martins | ||
Date: 16/01/2023 | ||
µCNC is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. Please see <http://www.gnu.org/licenses/> | ||
µCNC is distributed WITHOUT ANY WARRANTY; | ||
Also without the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
See the GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef BOARDMAP_RPI_PICO_H | ||
#define BOARDMAP_RPI_PICO_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#ifndef BOARD_NAME | ||
#define BOARD_NAME "RPi Pico" | ||
#endif | ||
|
||
// SAME AS GRBL for test purposes | ||
// Setup step pins | ||
#define STEP2_BIT 10 // assigns STEP2 pin | ||
#define STEP1_BIT 6 // assigns STEP1 pin | ||
#define STEP0_BIT 2 // assigns STEP0 pin | ||
|
||
// Setup dir pins | ||
#define DIR2_BIT 11 // assigns DIR2 pin | ||
#define DIR1_BIT 7 // assigns DIR1 pin | ||
#define DIR0_BIT 3 // assigns DIR0 pin | ||
|
||
#define LIMIT_Z_BIT 13 | ||
#define LIMIT_Y_BIT 9 | ||
#define LIMIT_X_BIT 5 | ||
|
||
// Setup control input pins | ||
// #define ESTOP_BIT 0 | ||
// #define ESTOP_PORT A | ||
//#define ESTOP_ISR | ||
|
||
// Setup com pins | ||
#define RX_BIT 1 | ||
#define TX_BIT 0 | ||
// only uncomment this if other port other then 0 is used | ||
// #define COM_PORT 0 | ||
|
||
//forces USB | ||
#define MCU_HAS_USB | ||
// Setup PWM | ||
#define PWM0_BIT 14 // assigns PWM0 pin | ||
|
||
// Setup generic IO Pins | ||
// spindle dir | ||
#define DOUT0_BIT 15 | ||
|
||
// Stepper enable pin. For Grbl on Uno board a single pin is used | ||
#define STEP2_EN_BIT 12 | ||
#define STEP1_EN_BIT 8 | ||
#define STEP0_EN_BIT 4 | ||
|
||
//activity LED | ||
#define DOUT31_BIT 25 | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
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,46 @@ | ||
/* | ||
Name: boardmap_rp_pico_w.h | ||
Description: Contains all MCU and PIN definitions for Raspberry Pi Pico W to run µCNC. | ||
Copyright: Copyright (c) João Martins | ||
Author: João Martins | ||
Date: 16/01/2023 | ||
µCNC is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. Please see <http://www.gnu.org/licenses/> | ||
µCNC is distributed WITHOUT ANY WARRANTY; | ||
Also without the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
See the GNU General Public License for more details. | ||
*/ | ||
|
||
#ifndef BOARDMAP_RPI_PICO_W_H | ||
#define BOARDMAP_RPI_PICO_W_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" | ||
{ | ||
#endif | ||
|
||
#ifndef BOARD_NAME | ||
#define BOARD_NAME "RPi Pico W" | ||
#endif | ||
|
||
#ifndef ENABLE_WIFI | ||
#define ENABLE_WIFI | ||
#endif | ||
|
||
#define BOARD_HAS_CUSTOM_SYSTEM_COMMANDS | ||
|
||
#include "boardmap_rpi_pico.h" | ||
|
||
// led pin is controlled by the external WiFi controller | ||
#undef DIO31_BIT | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif |
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,27 @@ | ||
################## | ||
# RP2040 Boards # | ||
################## | ||
|
||
[common_rp2040] | ||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git | ||
; board = pico | ||
framework = arduino | ||
board_build.core = earlephilhower | ||
; board_build.filesystem_size = 0.5m | ||
; change microcontroller | ||
board_build.mcu = rp2040 | ||
; change MCU frequency | ||
board_build.f_cpu = 133000000L | ||
lib_deps = adafruit/Adafruit TinyUSB Library@^2.0.3 | ||
build_flags = -DUSE_TINYUSB | ||
|
||
[env:rpi_pico] | ||
extends = common_rp2040 | ||
board = rpipico | ||
;build_src_filter = +<*>-<libraries/WiFi> | ||
build_flags = -DBOARD=BOARD_RPI_PICO | ||
|
||
[env:rpi_pico_w] | ||
extends = common_rp2040 | ||
board = rpipicow | ||
build_flags = -DBOARD=BOARD_RPI_PICO_W -DENABLE_WIFI |
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.