Comments (7)
I'm replying here because it is more appropriate than the other thread.
I made some modifications to the build files:
FILE: ref_app/target/app/make/app_make.gmk
- removed the ".exe" from the commands to work on Mac command line.
- I get errors from the "HexManip.exe" make command. I assume it changes the Hex file, but I don't know what changes it makes. Is there a linux equivalent for this program?
FILE: ref_app/target/micros/avr/make/avr_flags.gmk
- Updated the GCC_VERSION, but it looks like those changes are already made on the latest code base.
Able to successfully compile the ref_app on a Mac using the avr-gcc tool-chain. Put together a ATmega328p reference circuit with an LED on a bread board and successfully flashed the hex file. The LED blinked, so I believe the program ran successfully.
from real-time-cpp.
Thanks for the information James.
Were you able to to use GNUmake in its native form on the mac for the ref_app?
Yes. The HEX manipulation program is yet another open issue. Its purpose is to manipulate HEX files via things like adding fill bytes, patching memory sections together, computing CRC and hash data integrity checks and putting them in code for ROM/RAM integrity checks, etc.
Eventually, I would like to replace the executable file with portable sources for HEX-manipulation.
Cheers, Chris.
from real-time-cpp.
Yes, I'm still using the GNU makefiles provided in the project with the following changes:
- Change paths from backslash to forward slash for Mac paths.
- Hard code of the TGT = avr (I am only interested in AVR at this time)
- Removed ".exe" from all targets for mac command line.
- Update of the paths for the linux targets unique to my mac system ("/usr/bin/" instead of "/bin/")
- Use of a later GCC_VERSION = 4.8.2
- Build gcc targets are named "avr-" instead of avr-unknown-". This is probably a Macports specific change.
Used the following build command:
make -f target/app/make/app_make.gmk rebuild
This build successfully with one error related to the HexManip.exe file:
make: tools/generic/hex_tools/HexManip.exe: Permission denied
make: [bin/ref_app_flash.hex] Error 1 (ignored)
Here is the git diff for these changes:
diff --git a/ref_app/target/app/make/app_make.gmk b/ref_app/target/app/make/app_make.gmk
index f25aa17..b172a36 100644
--- a/ref_app/target/app/make/app_make.gmk
+++ b/ref_app/target/app/make/app_make.gmk
@@ -30,9 +30,10 @@ COMPILER_DIRECTORY = gcc-$(GCC_VERSION)-$(GCC_TARGET)
PATH_TOOLS = tools
PATH_TOOLS_UTIL = $(PATH_TOOLS)\Util
PATH_TOOLS_MINGW = $(PATH_TOOLS_UTIL)\MinGW\msys\1.0
-PATH_TOOLS_MINGW_BIN = $(PATH_TOOLS_MINGW)\bin
-PATH_TOOLS_CC = $(PATH_TOOLS_MINGW)\local\$(COMPILER_DIRECTORY)\bin
+PATH_TOOLS_MINGW_BIN = /bin
+PATH_TOOLS_CC = /opt/local/bin
+TGT = avr
PATH_APP = src
PATH_TGT = target/micros/$(TGT)
PATH_APP_MAKE = target/app/make
@@ -91,23 +92,23 @@ VPATH := $(sort $(dir $(FILES_TMP)))
# ------------------------------------------------------------------------------
# Development tools
# ------------------------------------------------------------------------------
-AR = $(PATH_TOOLS_CC)\$(GCC_TARGET)-ar.exe
-AS = $(PATH_TOOLS_CC)\$(GCC_TARGET)-g++.exe
-CC = $(PATH_TOOLS_CC)\$(GCC_TARGET)-g++.exe
-CL = $(PATH_TOOLS_CC)\$(GCC_TARGET)-g++.exe
-CPPFILT = $(PATH_TOOLS_CC)\$(GCC_TARGET)-c++filt.exe
-HEX_MANIP = $(PATH_TOOLS)\generic\hex_tools\HexManip.exe
-NM = $(PATH_TOOLS_CC)\$(GCC_TARGET)-nm.exe
-OBJDUMP = $(PATH_TOOLS_CC)\$(GCC_TARGET)-objdump.exe
-OBJCOPY = $(PATH_TOOLS_CC)\$(GCC_TARGET)-objcopy.exe
-READELF = $(PATH_TOOLS_CC)\$(GCC_TARGET)-readelf.exe
-SIZE = $(PATH_TOOLS_CC)\$(GCC_TARGET)-size.exe
-
-ECHO = $(PATH_TOOLS_MINGW_BIN)\echo.exe
-MAKE = $(PATH_TOOLS_MINGW_BIN)\make.exe
-MKDIR = $(PATH_TOOLS_MINGW_BIN)\mkdir.exe
-RM = $(PATH_TOOLS_MINGW_BIN)\rm.exe
-SED = $(PATH_TOOLS_MINGW_BIN)\sed.exe
+AR = $(PATH_TOOLS_CC)/$(GCC_TARGET)-ar
+AS = $(PATH_TOOLS_CC)/$(GCC_TARGET)-g++
+CC = $(PATH_TOOLS_CC)/$(GCC_TARGET)-g++
+CL = $(PATH_TOOLS_CC)/$(GCC_TARGET)-g++
+CPPFILT = $(PATH_TOOLS_CC)/$(GCC_TARGET)-c++filt
+HEX_MANIP = $(PATH_TOOLS)/generic/hex_tools/HexManip.exe
+NM = $(PATH_TOOLS_CC)/$(GCC_TARGET)-nm
+OBJDUMP = $(PATH_TOOLS_CC)/$(GCC_TARGET)-objdump
+OBJCOPY = $(PATH_TOOLS_CC)/$(GCC_TARGET)-objcopy
+READELF = $(PATH_TOOLS_CC)/$(GCC_TARGET)-readelf
+SIZE = $(PATH_TOOLS_CC)/$(GCC_TARGET)-size
+
+ECHO = $(PATH_TOOLS_MINGW_BIN)/echo
+MAKE = /usr/bin/make
+MKDIR = $(PATH_TOOLS_MINGW_BIN)/mkdir
+RM = $(PATH_TOOLS_MINGW_BIN)/rm
+SED = /usr/bin/sed
# ------------------------------------------------------------------------------
diff --git a/ref_app/target/micros/avr/make/avr_flags.gmk b/ref_app/target/micros/avr/make/avr_flags.gmk
index f74e641..371f447 100644
--- a/ref_app/target/micros/avr/make/avr_flags.gmk
+++ b/ref_app/target/micros/avr/make/avr_flags.gmk
@@ -9,8 +9,8 @@
# compiler flags for the target architecture
# ------------------------------------------------------------------------------
-GCC_VERSION = 4.7.2
-GCC_TARGET = avr-unknown-elf
+GCC_VERSION = 4.8.2
+GCC_TARGET = avr
TGT_STL_DIR = STL
TGT_STL_DEFS =
from real-time-cpp.
Hello Chris!
I'm using Windows but have a problem with hexmanip.exe too: it is missing and I can't figure out where to download it? Do I have to execute hexmanip.exe on the hex-file or can I comment this line out of app_make.gmk?
Thanks, Tom
from real-time-cpp.
Thanks Tom. Please just comment out the line. The presence of the line is actually a bug. Sorry, I thought had already corrected it. I will correct it next week. - Chris
from real-time-cpp.
The hex-manip line has been removed from the build script. But this breaks raspi and beagle bone builds of object binaries. Therefore, make a new issue for the creation of a new generic hex-manip facility.
from real-time-cpp.
The GNUmake scripts have been extended to include *nix compatibility. There are also new CMake scripts that probably run on the above-mentioned host.
from real-time-cpp.
Related Issues (20)
- Work around binutils/GAS on RISC-V upgrade HOT 1
- Extend display support to vacuum fluorescent serial devices
- Simplify gpt::get_time_elapsed() for host and x86_64
- Add target Teensy 4.0 HOT 2
- Add proper digital port I/O support for Teensy 4.0 HOT 1
- Finish/complete Example 9.08a with WS2812 RGB LED
- Correct readme Cortex(R) is registered TM
- Handle LINUX/DOS line endings and use LINUX once and for all with Make-Files HOT 1
- Upgrade code-snippets main markdown HOT 1
- Upgrade and refactor example chapter04_04 HOT 1
- Make separate CI/CD for examples
- Make a CI/CD pipeline for the Code Snippets
- Simplify Build Instructions MacOS in docs HOT 1
- Finish CI for those chapter having snippets HOT 1
- On MacOS CI runners wget GNU-ARM toolchain takes long HOT 3
- Improve syntax in atmega4809 MCAL
- Build error in chapter02_02 using Windows 11 (x64) HOT 9
- LINUX build file NUL from Win* null-device handling
- Handle CI failures in CI on MacOS runners HOT 1
- Add board support for WCH-V307 RISC-V
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from real-time-cpp.