Skip to content
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

Allow Marlin to relocate its HAL #68

Merged
merged 3 commits into from
Apr 25, 2023

Conversation

thinkyhead
Copy link
Contributor

@thinkyhead thinkyhead commented Apr 25, 2023

We might (or do) want to change the HAL_PATH macro so it includes the HAL folder name, and later we might move the HAL to a different location within the project. For example, if we decide to build it as a library it may be moved into a root lib folder.

To wit:

#define HAL_PATH(PATH, NAME) XSTR(PATH/HAL/AVR/NAME)

This PR adds SRCHOME and HALHOME preprocessor macros so that these locations can be overridden by defines added to our features.ini file, like so:

(ESP3D_)?WIFISUPPORT = AsyncTCP, ESP Async WebServer
                       ESP3DLib=https://github.com/luc-github/ESP3DLib/archive/master.zip
                       arduinoWebSockets=links2004/WebSockets@2.3.4
                       luc-github/ESP32SSDP@1.1.1
                       lib_ignore=ESPAsyncTCP
                       build_flags=-DSRCHOME=${platformio.src_dir}/src -DHALHOME=SRCHOME

The changes made to esp3dlibconfig.h allow for an elegant fallback to the old HAL_PATH behavior and location so that builds of older versions of Marlin will continue to work as usual.

Also, if 1.0.11 and 1.0.12 can be tagged in this repo, then we can specify a version to pull down, if for some reason that becomes necessary in the future.

Thanks and have a great day!

@luc-github luc-github merged commit dc0f3d9 into luc-github:master Apr 25, 2023
@luc-github
Copy link
Owner

Merged - thank you

@luc-github
Copy link
Owner

@thinkyhead this PR seems breaking compilation now:
image

Today people revert Marlin commits to make it work

the path given by ${platformio.src_dir}/src is in my case E:Marlin-bugfix-2.1.xMarlin/src
but it miss / should be : E:/Marlin-bugfix-2.1.x/Marlin/src

Is there anything that must be enabled with latest bugfix make the path correct and so to make compilation pass again ?

@luc-github
Copy link
Owner

issue is \ in path is not escaped and so ignored - I suggest a solution here : MarlinFirmware/Marlin#25743 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants