-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
355 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,4 @@ build | |
|
||
.vscode/settings.json | ||
.vscode/c_cpp_properties.json | ||
*.code-workspace |
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,123 @@ | ||
/* | ||
fysetc_s6_map.h - driver code for STM32F407 ARM processors | ||
Part of grblHAL | ||
Grbl 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. | ||
Grbl is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with Grbl. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#if N_ABC_MOTORS > 3 | ||
#error "Axis configuration is not supported!" | ||
#endif | ||
|
||
#if !defined(STM32F446xx) || HSE_VALUE != 12000000 | ||
#error "This board has STM32F446 processor with a 12MHz crystal, select a corresponding build!" | ||
#endif | ||
|
||
#define BOARD_NAME "Fysetc S6 V2.0" | ||
|
||
#define I2C_ENABLE 1 | ||
#define I2C_PORT 1 // PB8 / PB9 | ||
// #define I2C1_ALT_PINMAP // GPIOB, SCL_PIN = 6, SDA_PIN = 7 | ||
#define EEPROM_ENABLE 1 // 2K single byte addressing | ||
|
||
// Define step pulse output pins. | ||
#define X_STEP_PORT GPIOE | ||
#define X_STEP_PIN 11 | ||
#define Y_STEP_PORT GPIOD | ||
#define Y_STEP_PIN 8 | ||
#define Z_STEP_PORT GPIOD | ||
#define Z_STEP_PIN 14 | ||
#define STEP_OUTMODE GPIO_BITBAND | ||
//#define STEP_PINMODE PINMODE_OD // Uncomment for open drain outputs | ||
|
||
// Define step direction output pins. | ||
#define X_DIRECTION_PORT GPIOE | ||
#define X_DIRECTION_PIN 10 | ||
#define Y_DIRECTION_PORT GPIOB | ||
#define Y_DIRECTION_PIN 12 | ||
#define Z_DIRECTION_PORT GPIOD | ||
#define Z_DIRECTION_PIN 13 | ||
#define DIRECTION_OUTMODE GPIO_BITBAND | ||
//#define DIRECTION_PINMODE PINMODE_OD // Uncomment for open drain outputs | ||
|
||
// Define stepper driver enable/disable output pin. | ||
#define X_ENABLE_PORT GPIOE | ||
#define X_ENABLE_PIN 9 | ||
#define Y_ENABLE_PORT GPIOD | ||
#define Y_ENABLE_PIN 9 | ||
#define Z_ENABLE_PORT GPIOD | ||
#define Z_ENABLE_PIN 15 | ||
//#define STEPPERS_ENABLE_PINMODE PINMODE_OD // Uncomment for open drain outputs | ||
|
||
// Define homing/hard limit switch input pins. | ||
#define X_LIMIT_PORT GPIOB | ||
#define X_LIMIT_PIN 14 // X- Limit | ||
#define Y_LIMIT_PORT GPIOB | ||
#define Y_LIMIT_PIN 13 // Y- Limit | ||
#define Z_LIMIT_PORT GPIOA | ||
#define Z_LIMIT_PIN 0 // Z- Limit | ||
#define LIMIT_INMODE GPIO_BITBAND | ||
|
||
// Define spindle enable and spindle direction output pins. | ||
#define SPINDLE_ENABLE_PORT GPIOB | ||
#define SPINDLE_ENABLE_PIN 1 // FAN1 | ||
#define SPINDLE_DIRECTION_PORT GPIOB | ||
#define SPINDLE_DIRECTION_PIN 2 // FAN2 | ||
|
||
// Define spindle PWM output pin. | ||
#define SPINDLE_PWM_PORT_BASE GPIOB_BASE | ||
#define SPINDLE_PWM_PIN 0 // FAN0 | ||
|
||
// Define flood and mist coolant enable output pins. | ||
#define COOLANT_FLOOD_PORT GPIOB | ||
#define COOLANT_FLOOD_PIN 1 // HEAT0 | ||
#define COOLANT_MIST_PORT GPIOD | ||
#define COOLANT_MIST_PIN 14 // HEAT1 | ||
|
||
// Define user-control controls (cycle start, reset, feed hold) input pins. | ||
#define RESET_PORT GPIOA | ||
#define RESET_PIN 1 // X+ Limit | ||
#define FEED_HOLD_PORT GPIOA | ||
#define FEED_HOLD_PIN 2 // Y+ Limit | ||
#define CYCLE_START_PORT GPIOA | ||
#define CYCLE_START_PIN 3 // Z+ Limit | ||
|
||
#if SAFETY_DOOR_ENABLE | ||
//#define SAFETY_DOOR_PORT GPIOG | ||
//#define SAFETY_DOOR_PIN 6 // EXP1 PG4 | ||
#endif | ||
#define CONTROL_INMODE GPIO_BITBAND | ||
|
||
// Define probe switch input pin. | ||
#define PROBE_PORT GPIOA | ||
#define PROBE_PIN 1 // BLTouch PA1 | ||
|
||
#if SDCARD_ENABLE | ||
#define SD_CS_PORT GPIOA | ||
#define SD_CS_PIN 4 | ||
#define SPI_PORT 1 // GPIOA, SCK_PIN = 5, MISO_PIN = 6, MOSI_PIN = 7 (EXP2 Header) | ||
#endif | ||
|
||
#if TRINAMIC_UART_ENABLE | ||
|
||
#define MOTOR_UARTX_PORT GPIOE | ||
#define MOTOR_UARTX_PIN 8 | ||
#define MOTOR_UARTY_PORT GPIOC | ||
#define MOTOR_UARTY_PIN 4 | ||
#define MOTOR_UARTZ_PORT GPIOD | ||
#define MOTOR_UARTZ_PIN 12 | ||
|
||
#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
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,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>© 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 | ||
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 512K - 128K | ||
EEPROM_EMUL(xrw) : ORIGIN = 0x8060000, LENGTH = 128K | ||
} | ||
|
||
_FLASH_VectorTable = ORIGIN(FLASH); | ||
_EEPROM_Emul_Start = ORIGIN(EEPROM_EMUL); | ||
_EEPROM_Emul_Sector = 11; | ||
|
||
/* Sections */ | ||
SECTIONS | ||
{ | ||
/* The startup code into "FLASH" Rom type memory */ | ||
.isr_vector : | ||
{ | ||
. = ALIGN(4); | ||
KEEP(*(.isr_vector)) /* Startup code */ | ||
. = ALIGN(4); | ||
} >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) } | ||
} |
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