Skip to content

Commit

Permalink
Moved board maps and code to separate directory.
Browse files Browse the repository at this point in the history
Updated Web Builder board definition file.
  • Loading branch information
terjeio committed Jan 31, 2024
1 parent c83f6a0 commit b92c96c
Show file tree
Hide file tree
Showing 31 changed files with 526 additions and 170 deletions.
276 changes: 248 additions & 28 deletions .cproject

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions GRBL Driver STM32F4xx Debug F411 Blackpill.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="com.st.stm32cube.ide.mcu.debug.launch.launchConfigurationType">
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.access_port_id" value="0"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.cubeprog_external_loaders" value="[]"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_certif_path" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_check_enable" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_key_path" value=""/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.launch.debug_auth_permission" value="debug_non_secure_L3"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_live_expr" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.enable_swv" value="false"/>
<intAttribute key="com.st.stm32cube.ide.mcu.debug.launch.formatVersion" value="2"/>
Expand All @@ -23,12 +28,9 @@
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.launch.verify_flash_download" value="true"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_allow_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.cti_signal_halt" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_external_loader" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_logging" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_max_halt_delay" value="false"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.enable_shared_stlink" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.external_loader" value=""/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.external_loader_init" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.frequency" value="0"/>
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.halt_all_on_reset" value="false"/>
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.log_file" value="D:\Projects\STM\GRBL Driver STM32F401\Debug F411 Blackpill\st-link_gdbserver_log.txt"/>
Expand Down Expand Up @@ -72,12 +74,16 @@
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="GRBL Driver STM32F401"/>
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.config.exe.release.1170194714.977692720.1674432115.204573591"/>
<booleanAttribute key="org.eclipse.debug.core.ATTR_FORCE_SYSTEM_CONSOLE_ENCODING" value="false"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/GRBL Driver STM32F401"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="4"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;"/>
<stringAttribute key="process_factory_id" value="com.st.stm32cube.ide.mcu.debug.launch.HardwareDebugProcessFactory"/>
</launchConfiguration>
38 changes: 19 additions & 19 deletions Inc/driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,43 +134,43 @@
#if EEPROM_ENABLE
#error EEPROM plugin not supported!
#endif
#include "cnc3040_map.h"
#include "boards/cnc3040_map.h"
#elif defined(BOARD_BLACKPILL)
#include "blackpill_map.h"
#include "boards/blackpill_map.h"
#elif defined(BOARD_BLACKPILL_ALT2)
#include "blackpill_alt2_map.h"
#include "boards/blackpill_alt2_map.h"
#elif defined(BOARD_DEVTRONIC_CNC)
#include "Devtronic_CNC_Controller_map.h"
#include "boards/Devtronic_CNC_Controller_map.h"
#elif defined(BOARD_BTT_SKR_PRO_1_1)
#include "btt_skr_pro_v1_1_map.h"
#include "boards/btt_skr_pro_v1_1_map.h"
#elif defined(BOARD_BTT_SKR_20)
#include "btt_skr_2.0_map.h"
#include "boards/btt_skr_2.0_map.h"
#elif defined(BOARD_BTT_SKR_20_DAC)
#include "btt_skr_2.0_dac_map.h"
#include "boards/btt_skr_2.0_dac_map.h"
#elif defined(BOARD_FYSETC_S6)
#include "fysetc_s6_map.h"
#include "boards/fysetc_s6_map.h"
#elif defined(BOARD_PROTONEER_3XX)
#include "protoneer_3.xx_map.h"
#include "boards/protoneer_3.xx_map.h"
#elif defined(BOARD_GENERIC_UNO)
#include "uno_map.h"
#include "boards/uno_map.h"
#elif defined(BOARD_MORPHO_CNC)
#include "st_morpho_map.h"
#include "boards/st_morpho_map.h"
#elif defined(BOARD_MORPHO_DAC_CNC)
#include "st_morpho_dac_map.h"
#include "boards/st_morpho_dac_map.h"
#elif defined(BOARD_MINI_BLACKPILL)
#include "mini_blackpill_map.h"
#include "boards/mini_blackpill_map.h"
#elif defined(BOARD_FLEXI_HAL)
#include "flexi_hal_map.h"
#include "boards/flexi_hal_map.h"
#elif defined(BOARD_STM32F401_UNI)
#include "stm32f401_uni_map.h"
#include "boards/stm32f401_uni_map.h"
#elif defined(BOARD_HALCYON_V1)
#include "halcyon_v1_map.h"
#include "boards/halcyon_v1_map.h"
#elif defined(BOARD_MKS_ROBIN_NANO_30)
#include "mks_robin_nano_v3.0_map.h"
#include "boards/mks_robin_nano_v3.0_map.h"
#elif defined(BOARD_MY_MACHINE)
#include "my_machine_map.h"
#include "boards/my_machine_map.h"
#else // default board
#include "generic_map.h"
#include "boards/generic_map.h"
#endif

#if DRIVER_SPINDLE_ENABLE && !defined(SPINDLE_ENABLE_PIN)
Expand Down
6 changes: 4 additions & 2 deletions Inc/my_machine.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//#define BOARD_PROTONEER_3XX // For use with Nucleo-F411RE and F446RE boards.
//#define BOARD_GENERIC_UNO // For use with Nucleo-F411RE and F446RE boards.
//#define BOARD_CNC_BOOSTERPACK
//#define BOARD_MORPHO_CNC // For use with Nucleo-F411RE and F446RE boards. Work in progress.
#define BOARD_MORPHO_CNC // For use with Nucleo-F411RE and F446RE boards. Work in progress.
//#define BOARD_MORPHO_DAC_CNC // For use with F446RE boards and a 32-bit I2S stereo DAC for X and Y output. **EXPERIMENTAL**
//#define BOARD_BLACKPILL // For use with F411 BlackPill, with optional auto square support for one axis
//#define BOARD_BLACKPILL_ALT2 // For use with F411 BlackPill, with optional auto square support for one axis, I2C and spindle sync
Expand Down Expand Up @@ -68,7 +68,7 @@
// If none are specified the default PWM spindle is instantiated.
// Spindle definitions can be found in grbl/spindle_control.h.
// More here https://github.com/grblHAL/Plugins_spindle
//#define SPINDLE0_ENABLE SPINDLE_HUANYANG1
//#define SPINDLE0_ENABLE SPINDLE_ALL
//#define SPINDLE1_ENABLE SPINDLE_PWM0
//#define SPINDLE2_ENABLE SPINDLE_NONE
//#define SPINDLE3_ENABLE SPINDLE_NONE
Expand Down Expand Up @@ -120,6 +120,8 @@
//#define Z_GANGED_LIM_MAX 1
//

//#define STATUS_LIGHT_ENABLE 1
#define BLTOUCH_ENABLE 1
#ifdef _WIZCHIP_
#define ETHERNET_ENABLE 1
#endif
Expand Down
3 changes: 2 additions & 1 deletion STM32F407VGTX_BL32K_FLASH.ld
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ _Min_Stack_Size = 0x1000 ; /* required amount of stack */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 1024K - 32K - 128K
BOOT_FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 32K
EEPROM_EMUL(xrw) : ORIGIN = 0x80E0000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 1024K - 32K - 128K
}

_FLASH_VectorTable = ORIGIN(FLASH);
Expand Down
180 changes: 180 additions & 0 deletions STM32F446RETX_BL32K_FLASH.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
/**
******************************************************************************
* @file LinkerScript.ld
* @author Auto-generated by STM32CubeIDE
* Abstract : Linker script for NUCLEO-F446RE Board embedding STM32F446RETx Device from stm32f4 series
* 512Kbytes FLASH
* 128Kbytes RAM
*
* Set heap size, stack size and stack location according
* to application requirements.
*
* Set memory bank area and size if external memory is used
******************************************************************************
* @attention
*
* <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
* All rights reserved.</center></h2>
*
* This software component is licensed by ST under BSD 3-Clause license,
* the "License"; You may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
* opensource.org/licenses/BSD-3-Clause
*
******************************************************************************
*/

/* Entry Point */
ENTRY(Reset_Handler)

/* Highest address of the user mode stack */
_estack = ORIGIN(RAM) + LENGTH(RAM); /* end of "RAM" Ram type memory */

_Min_Heap_Size = 0x2000 ; /* required amount of heap */
_Min_Stack_Size = 0x400 ; /* required amount of stack */

/* Memories definition */
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
BOOT_FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 16K
EEPROM_EMUL(xrw) : ORIGIN = 0x8060000, LENGTH = 128K
FLASH (rx) : ORIGIN = 0x8008000, LENGTH = 512K - 16K - 128K
}

_EEPROM_Emul_Start = ORIGIN(EEPROM_EMUL);
_EEPROM_Emul_Sector = 1;

/* Sections */
SECTIONS
{
/* The startup code into "FLASH" Rom type memory */
.isr_vector :
{
. = ALIGN(4);
KEEP(*(.isr_vector)) /* Startup code */
. = ALIGN(4);
} >BOOT_FLASH

/* The program code and other data into "FLASH" Rom type memory */
.text :
{
. = ALIGN(4);
*(.text) /* .text sections (code) */
*(.text*) /* .text* sections (code) */
*(.glue_7) /* glue arm to thumb code */
*(.glue_7t) /* glue thumb to arm code */
*(.eh_frame)

KEEP (*(.init))
KEEP (*(.fini))

. = ALIGN(4);
_etext = .; /* define a global symbols at end of code */
} >FLASH

/* Constant data into "FLASH" Rom type memory */
.rodata :
{
. = ALIGN(4);
*(.rodata) /* .rodata sections (constants, strings, etc.) */
*(.rodata*) /* .rodata* sections (constants, strings, etc.) */
. = ALIGN(4);
} >FLASH

.ARM.extab : {
. = ALIGN(4);
*(.ARM.extab* .gnu.linkonce.armextab.*)
. = ALIGN(4);
} >FLASH

.ARM : {
. = ALIGN(4);
__exidx_start = .;
*(.ARM.exidx*)
__exidx_end = .;
. = ALIGN(4);
} >FLASH

.preinit_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP (*(.preinit_array*))
PROVIDE_HIDDEN (__preinit_array_end = .);
. = ALIGN(4);
} >FLASH

.init_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array*))
PROVIDE_HIDDEN (__init_array_end = .);
. = ALIGN(4);
} >FLASH

.fini_array :
{
. = ALIGN(4);
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array*))
PROVIDE_HIDDEN (__fini_array_end = .);
. = ALIGN(4);
} >FLASH

/* Used by the startup to initialize data */
_sidata = LOADADDR(.data);

/* Initialized data sections into "RAM" Ram type memory */
.data :
{
. = ALIGN(4);
_sdata = .; /* create a global symbol at data start */
*(.data) /* .data sections */
*(.data*) /* .data* sections */

. = ALIGN(4);
_edata = .; /* define a global symbol at data end */

} >RAM AT> FLASH

/* Uninitialized data section into "RAM" Ram type memory */
. = ALIGN(4);
.bss :
{
/* This is used by the startup in order to initialize the .bss section */
_sbss = .; /* define a global symbol at bss start */
__bss_start__ = _sbss;
*(.bss)
*(.bss*)
*(COMMON)

. = ALIGN(4);
_ebss = .; /* define a global symbol at bss end */
__bss_end__ = _ebss;
} >RAM

/* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
._user_heap_stack :
{
. = ALIGN(8);
PROVIDE ( end = . );
PROVIDE ( _end = . );
. = . + _Min_Heap_Size;
. = . + _Min_Stack_Size;
. = ALIGN(8);
} >RAM

/* Remove information from the compiler libraries */
/DISCARD/ :
{
libc.a ( * )
libm.a ( * )
libgcc.a ( * )
}

.ARM.attributes 0 : { *(.ARM.attributes) }
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 3 additions & 5 deletions Inc/cnc3040_map.h → boards/cnc3040_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
* -----------
* VB | | +3V
* C13 | | GND
* Coolant Flood C14 | | +5V
* Coolant Mist C15 | * - * | B9 Steppers enable
* C14 | | +5V
* C15 | * - * | B9 Steppers enable
* RST | |K| | B8 Safety door
* X Step A0 | - | B7 Feed Hold
* X Direction A1 | | B6 Cycle Start
* Y Step A2 | | B5 Reset/EStop Probe
* Y Step A2 | | B5 Reset/EStop
* Y Direction A3 | / \ | B4 Coolant Mist
* Z Step A4 | <MCU> | B3 Coolant Flood
* Z Direction A5 | \ / | A15
Expand Down Expand Up @@ -60,8 +60,6 @@
#endif
#define BOARD_URL "https://github.com/shaise/GrblCNC/tree/master/Hardware/GrblCnc3040"

#define SERIAL_PORT 11 // GPIOB: TX = 6, RX = 7

// Define step pulse output pins.
#define STEP_PORT GPIOA
#define X_STEP_PIN 0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions Inc/mini_blackpill_map.h → boards/mini_blackpill_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
* X Step A0 | - | B7 Feed Hold
* X Direction A1 | | B6 Reset/EStop
* Y Step A2 | | B5
* Y Direction A3 | / \ | B4 Coolant Mist
* Y Direction A3 | / \ | B4
* Z Step A4 | <MCU> | B3 Spindle Index
* Z Direction A5 | \ / | A15 Spindle Pulse
* Aux Out In 0/Out 1 / M3 Step A6 | | A12 USB D+
* Aux Out 0 / M3 Direction A7 | - - | A11 USB D-
* Steppers enable B0 | |R| |B| | A10
* Spindle Enable B1 | - - | A9
* Steppers enable B0 | |R| |B| | A10 UART RX
* Spindle Enable B1 | - - | A9 UART TX
* Spindle Direction B2 | | A8 Spindle PWM
* B10 | | B15 Probe
* +3V | ----- | B14 Z Limit
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions Inc/st_morpho_map.h → boards/st_morpho_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,15 +254,15 @@
#define AUXOUTPUT3_PORT GPIOA
#define AUXOUTPUT3_PIN 5
#ifndef AUXOUTPUT4_PORT
#define AUXOUTPUT4_PORT GPIOA
#define AUXOUTPUT4_PIN 7
//#define AUXOUTPUT4_PORT GPIOA
//#define AUXOUTPUT4_PIN 7
#endif
#ifndef AUXOUTPUT5_PORT
#define AUXOUTPUT5_PORT GPIOB
#define AUXOUTPUT5_PIN 7
#endif
#if MPG_MODE == 0
#if (SPINDLE_ENABLE & (1<<SPINDLE_PWM2))
#if 1
#define AUXOUTPUT0_PWM_PORT_BASE GPIOC_BASE
#define AUXOUTPUT0_PWM_PIN 8
#elif !defined(AUXOUTPUT6_PORT)
Expand All @@ -282,6 +282,7 @@
*/
/*
#define NEOPIXEL_SPI 1 // PA7
#define NEOPIXELS_NUM 6
*/

#if SAFETY_DOOR_ENABLE
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b92c96c

Please sign in to comment.