grblHAL / Simulator

grblHAL drivers for simulation (Linux and Windows)
Other
28 stars 10 forks source link

"The specified File could not be found" error during running Make cmd. #1

Open Coolxer opened 3 years ago

Coolxer commented 3 years ago

Hello, Firsty, I have downloaded repository https://github.com/grblHAL/STM32F4xx with submodules, then I cloned this repository into the grbl directory of STM32F4xx. Just like the manual says I modified Makefile (change platform to Windows and also changed paths to files: GRBL_BASE_OBJECTS are in the parent directory, other files are in the current).

Unfortunately I still receiving error, that specified file cannot be found. The error suggests there is problem with grbl_interface file, so i also updated paths here, but it didnt solve problem.

make

Poniżej fragment Makefile ` PLATFORM = WINDOWS

GRBL_BASE_OBJECTS = ../grbllib.o ../protocol.o ../planner.o ../settings.o ../nuts_bolts.o ../stepper.o ../gcode.o ../stream.o ../spindle_control.o ../motion_control.o ../limits.o ../coolant_control.o ../system.o ../report.o ../state_machine.o ../override.o ../nvs_buffer.o ../sleep.o ../tool_change.o ../my_plugin.o

SIM_OBJECTS = main.o simulator.o driver.o eeprom.o grbl_eepromextensions.o mcu.o serial.o platform$(PLATFORM).o

GRBL_SIM_OBJECTS = grbl_interface.o $(GRBL_BASE_OBJECTS) $(SIM_OBJECTS) GRBL_VAL_OBJECTS = validator.o validator_driver.o $(GRBL_BASE_OBJECTS)

CLOCK = 16000000 SIM_EXE_NAME = grbl_sim.exe VALIDATOR_NAME = gvalidate.exe FLAGS = -g -O3 COMPILE = $(CC) -Wall $(FLAGS) -DFCPU=$(CLOCK) -I. -DPLAT$(PLATFORM) LINUX_LIBRARIES = -lrt -pthread OSX_LIBRARIES = WINDOWS_LIBRARIES =

all: main gvalidate

new: clean main gvalidate

clean: rm -f $(SIM_EXE_NAME) $(GRBL_SIM_OBJECTS) $(VALIDATOR_NAME) $(GRBL_VAL_OBJECTS)

main: $(GRBL_SIM_OBJECTS) $(COMPILE) -o $(SIM_EXE_NAME) $(GRBL_SIM_OBJECTS) -lm $($(PLATFORM)_LIBRARIES)

gvalidate: $(GRBL_VAL_OBJECTS) $(COMPILE) -o $(VALIDATOR_NAME) $(GRBL_VAL_OBJECTS) -lm $($(PLATFORM)_LIBRARIES)

%.o: %.c $(COMPILE) -c $< -o $@

grbl/planner.o: grbl/planner.c $(COMPILE) -include planner_inject_accessors.c -c $< -o $@ `

terjeio commented 3 years ago

You cannot add microprocessor drivers to the simulator (or vice versa)...

If you want to run STM32F4xx grblHAL in a Windows or Linux machine you have to get hold of an emulator (I do not know if one even exists) and run the native binary in that.

Coolxer commented 3 years ago

Thanks for the answer.

This repository contains an experimental Grbl simulator that compiles the main Grbl source code into a wrapped executable for use on a computer. No microcontroller required. When the executable is run, the user should be able to interact with the Grbl simulator as if connected to a microcontroller board with Grbl

I wanted to use grbl simulator without microcontroller like READ.ME says, but it require microprocessor drivers, which are not available? How can i run and use it? I am new in cnc world and before using real microcontroller (i have already stm32f446re) just wanted to try out virtual version to learn some gcodes.

terjeio commented 3 years ago

The simulator contains a virtual microcontroller and a corresponding grblHAL driver (in fact it contains two drivers) so the project is complete and can be compiled "as-is". Note that I have not tested compilation on a Windows machine.

Coolxer commented 3 years ago

Ok, so I understand I should clone this repository to fetch the grblhal/core repo too. git clone --recurse-submodules https://github.com/grblHAL/Simulator.

This time i do not need to modify paths, just platform. It still not working, but as you say it must be problem with general Windows platform or just myself. I will try to go around. Thanks.

terjeio commented 3 years ago

I just checked compilation and execution on my Linux box, and I can confirm it works.

On Windows you have to set up a compiler and what not. Some useful information can be be found on the site of the original? E.g. this issue may be helpful.

calabr commented 2 years ago

Build Simulator for Windows: 1) Install compiller Istall cygwin environment visit https://www.cygwin.com/install.html download and run https://www.cygwin.com/setup-x86_64.exe In the install wizard select