-
Notifications
You must be signed in to change notification settings - Fork 327
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
Examples stuff: fix examples/rules, extend rules and add f7 examples #193
base: master
Are you sure you want to change the base?
Conversation
LIBNAME = opencm3_stm32l4 | ||
DEFS += -DSTM32L4 | ||
|
||
FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv5-sp-d16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where di you get that it's v5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right though, I have this as an unchecked in file locally, never committed when the "basics" example was added.
I'm not adding more blinkers here. https://github.com/libopencm3/libopencm3-miniblink has them now, it avoids the sort of arbitraty styel differences and gives a common base. |
$(foreach S,$(call DIR,$(OPENCM3_DIR)/lib/$(M)), \ | ||
$(if $(subst opencm3_$M$S,,$(LIBNAME)),,$M/$S)), \ | ||
$M))) | ||
# exceptions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely not interested in this one. I've had enough rpoblems with people trying to pick and choose things, and reportings bugs when all they really needed to do was just run "make" once in the top and everythign would have been fine. This relies far too much on knowledge of the build system and file structure within the library, which should be treated as a simple .a dependency. It's a submodule for exactly that reason, just build it once, move on.
@@ -186,7 +186,7 @@ endif | |||
# Build libopencm3-lib if it does exists | |||
$(OPENCM3_DIR)/lib/lib$(LIBNAME).a: | |||
$(warning $(LIBNAME).a not found, attempting to rebuild in $(OPENCM3_DIR)) | |||
$(MAKE) -C $(OPENCM3_DIR) $(LIBFOLDER) | |||
$(MAKE) -C $(OPENCM3_DIR) $(LIBFOLDER) $(if $(CFLAGS),CFLAGS="$(CFLAGS)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what sort of usecase is this meant to support?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess it makes no sense having this in the examples
Tell me more about this ""no recipe found for header" problem, I'm not sure what you're reporting here. |
"no recipe found for header" |
Are you talking about these warnings on the clean?
I can't reproduce any "no recipe found for header" problem. I tried with
Is there some other step you needed to make this trigger? |
I've added my local files that I hadn't committed. (it's v4 for the fpu, v5 is for cortex-m7 parts) I've also taken the led definitions from your f769i blink and added it to the miniblink repo: libopencm3/libopencm3-miniblink@199faa9 |
yeah sorry about the v5 fpu. i should have been more careful there. my motivation to change the makefile-system of the examples was, to simplify writing the dsi and other stuff from within the examples project. i should probably just do the development stuff in a standalone project. LIBNAME is not defined in New Style Makefiles if libopencm3 is not built $(OPENCM3_DIR)/lib/lib$(LIBNAME).a:
$(warning $(LIBNAME).a not found, attempting to rebuild in $(OPENCM3_DIR))
$(MAKE) -C $(OPENCM3_DIR) becomes: $(OPENCM3_DIR)/lib/lib.a:
$(warning .a not found, attempting to rebuild in $(OPENCM3_DIR))
$(MAKE) -C $(OPENCM3_DIR) also LDLIBS and LIBDEPS have garbage values in them LDLIBS += -l
LIBDEPS += $(OPENCM3_DIR)/lib/lib.a for the examples, this probably only means i have to recompile and everything works. but if I want to use the genlink script to setup the ARCH flags for the device, i either have to backup/restore the LDLIBS/LIBDEPS before/after including genlink-config or just copy/adapt it. i can trigger the undefined header rule stuff with this (and i know that this is not the intended usage) libopencm3-examples $ make
...
libopencm3-examples $ make -C libopencm3 clean
...
libopencm3-examples $ make -C examples/stm32/f7/stm32f769i-discovery/sdram clean all
...
make[1]: Leaving directory '.../libopencm3-examples/libopencm3'
make: *** No rule to make target '../../../../../libopencm3/include/libopencm3/stm32/f4/nvic.h', needed by 'console.o'. Stop.
make: Leaving directory '.../libopencm3-examples/examples/stm32/f4/stm32f429i-discovery/sdram' |
This PR requires the newest libopencm3 master..
Fixes:
rules.mk extensions
libopencm3_stm32f4.a: lib/stm32/f4;
, but this also looks like overkill..f7-examples for gpio, exti and fmc