Hello,
I’m trying to compile GRBL-MEGA for my CNC based on a RAMPS 1.4 board (arduino Mega 2560);
When I try to compile the normal version (not for ramps), it compile and upload correctly, but when I modify the lines for ramps :
“// Define CPU pin map and default settings.
// NOTE: OEMs can avoid the need to maintain/update the defaults.h and cpu_map.h files and use only
// one configuration file by placing their specific defaults and pin map at the bottom of this file.
// If doing so, simply comment out these two defines and see instructions below.
// #define DEFAULTS_GENERIC
// #define CPUMAP2560_INITIAL
// To use with RAMPS 1.4 Board, comment out the above defines and uncomment the next two defines
#define DEFAULTSRAMPSBOARD
#define CPUMAP2560RAMPSBOARD
“
it compile, but it stop uploading at 50% with the message “avrdude: stk500v2_ReceiveMessage(): timeout”
I tried using arduino 2 and arduino_CLI with the same results, so the problem is with the code, but I don’t know where to look…
Can you help me ?
Thanks,
D.
#1 – sergalpe 于 2023-08-03
Try this:
Change in cpu_map.h
#define XSTEPBIT 54 // old value ->2 MEGA2560 Digital Pin 24
#define YSTEPBIT 60// old value ->3 MEGA2560 Digital Pin 25
And in eeprom.c
checksum = (checksum << 1) | (checksum >> 7);