-
Notifications
You must be signed in to change notification settings - Fork 27
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
Please, help check and suggest modifications CNC3040 map file. #40
Comments
If you rename the file to my_machine_map.h then no other files than my_machine.h needs to be changed. Enable the map file here. The FEED_HOLD_PIN and M4_LIMIT_PIN (incorrectly defined as M3_LIMIT_PIN above) cannot have the same pin number since the STM32 architecture only allows one interrupt per pin number regardless of the port. M3_LIMIT_PORT has also a duplicate definition. FYI the C8 (128K flash version, in reality a CB device) is nearly at its limits for both flash and RAM and updates will soon no longer be possible, consider switching to a medium density (RC or better) variant or F303/F411 Blackpills. |
Hi, Terjeio Thanks a lot for your suggest. I don't know how to code but look at other map files and try to fix them. I edited it as you suggested.
|
I believe so, compile and flash - then test. |
Your grbl folder is nearly empty, it should contain all the core files. |
Oops, I forgot to check for allowed PWM pins. Replace these lines with the code below to add PA10 PWM output:
|
Is the board map above the version you are compiling with? I cannot see issues with the IRQ enabled pins in that. |
https://github.com/grblHAL/STM32F1xx/archive/refs/heads/master.zip |
Add your latest copy of the modified map file to a comment. |
There is a duplicate |
#if N_ABC_MOTORS > 2 || N_GANGED #if EEPROM_ENABLE #if N_AXIS == 5 // Define step pulse output pins. // Define step direction output pins. // Define stepper driver enable/disable output pin. // Define homing/hard limit switch input pins. // Define ganged axis or A axis step pulse and step direction output pins. // Define ganged axis or B axis step pulse and step direction output pins. // Define spindle enable and spindle direction output pins. // Define flood and mist coolant enable output pins. // Define user-control controls (cycle start, reset, feed hold) input pins. // Define probe switch input pin. #if KEYPAD_ENABLE == 1 |
Seems like you are building a debug version, this will not or barely fit flash depending on the options enabled in my_machine.h. PS: I removed the duplicate Tip: to reclaim flash disable USB and use an external USB <> UART breakout board for talking to the controller. |
I still trying... |
Here is a release binary that I built with your map file: |
Hello,
I use Blue Pill but try to re-map pins difference from CNC3040 and need UART1. This is a map file that I try to modifications and What other files do I need to edit?
#if N_ABC_MOTORS > 2 || N_GANGED
#error Axis configuration is not supported!
#endif
#if EEPROM_ENABLE
#error EEPROM plugin not supported!
#endif
#if N_AXIS == 5
#define BOARD_NAME "CNC 3040 5-axis"
#elif N_AXIS == 4
#define BOARD_NAME "CNC 3040 4-axis"
#else
#define BOARD_NAME "CNC 3040"
#endif
// Define step pulse output pins.
#define X_STEP_PORT GPIOA
#define X_STEP_PIN 5
#define Y_STEP_PIN 7
#define Z_STEP_PORT GPIOB
#define Z_STEP_PIN 1
#define STEP_OUTMODE GPIO_BITBAND
// Define step direction output pins.
#define X_DIRECTION_PORT GPIOA
#define X_DIRECTION_PIN 6
#define Z_DIRECTION_PORT GPIOB
#define Y_DIRECTION_PIN 0
#define Z_DIRECTION_PIN 10
#define DIRECTION_OUTMODE GPIO_BITBAND
// Define stepper driver enable/disable output pin.
#define STEPPERS_ENABLE_PORT GPIOB
#define STEPPERS_ENABLE_PIN 13
// Define homing/hard limit switch input pins.
#define LIMIT_PORT GPIOA
#define X_LIMIT_PIN 0
#define Y_LIMIT_PIN 1
#define Z_LIMIT_PIN 2
#define LIMIT_INMODE GPIO_SHIFT10
// Define ganged axis or A axis step pulse and step direction output pins.
#if N_ABC_MOTORS > 0
#define M3_AVAILABLE
#define M3_STEP_PORT GPIOB
#define M3_STEP_PIN 11
#define M3_DIRECTION_PORT GPIOB
#define M3_DIRECTION_PIN 12
#define M3_LIMIT_PORT GPIOA
#define M3_LIMIT_PIN 3
#endif
// Define ganged axis or B axis step pulse and step direction output pins.
#if N_ABC_MOTORS == 2
#define M4_AVAILABLE
#define M4_STEP_PORT GPIOB
#define M4_STEP_PIN 14
#define M4_DIRECTION_PORT GPIOB
#define M4_DIRECTION_PIN 15
#define M4_LIMIT_PORT GPIOA
#define M4_LIMIT_PIN 4
#endif
// Define spindle enable and spindle direction output pins.
#define SPINDLE_ENABLE_PORT GPIOA
#define SPINDLE_ENABLE_PIN 8
#define SPINDLE_DIRECTION_PORT GPIOA
#define SPINDLE_DIRECTION_PIN 9
// Define spindle PWM output pin.
#define SPINDLE_PWM_PORT_BASE GPIOA_BASE
#define SPINDLE_PWM_PIN 10
// Define flood and mist coolant enable output pins.
#define COOLANT_FLOOD_PORT GPIOB
#define COOLANT_FLOOD_PIN 3
#define COOLANT_MIST_PORT GPIOA
#define COOLANT_MIST_PIN 15
// Define user-control controls (cycle start, reset, feed hold) input pins.
#define CONTROL_PORT GPIOB
#define RESET_PIN 9
#define CYCLE_START_PIN 5
#define CONTROL_PORT GPIOC
#define FEED_HOLD_PIN 14
#if SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_PIN 15
#endif
#define CONTROL_INMODE GPIO_BITBAND
// Define probe switch input pin.
#define PROBE_PORT GPIOB
#define PROBE_PIN 8
#if KEYPAD_ENABLE == 1
#error I2C keypad mode is not supported!
#endif
The text was updated successfully, but these errors were encountered: