Skip to content

Commit 786e3f5

Browse files
committed
Merge pull request arduino#306 from tbowmo/samd
snprintf_P missing in arduino core for samd, so have a local macro
2 parents 1396bf8 + 5df6fc0 commit 786e3f5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

hardware/MySensors/samd/platform.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpp.flags} -D
8686
recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} {compiler.S.extra_flags} {build.extra_flags} {compiler.arm.cmsis.path} {includes} "{source_file}" -o "{object_file}"
8787

8888
## Create archives
89-
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
89+
#recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}"
9090

9191
## Combine gc-sections, archives, and objects
9292
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} "-T{build.variant.path}/{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=nano.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}.elf" {object_files} -Wl,--start-group -lm "{build.path}/{archive_file}" -Wl,--end-group

libraries/MySensors/core/MyHwSAMD.h

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
#define min(a,b) ((a)<(b)?(a):(b))
3737
#define max(a,b) ((a)>(b)?(a):(b))
38+
#define snprintf_P(s, f, ...) snprintf((s), (f), __VA_ARGS__)
3839

3940

4041
// Define these as macros to save valuable space

libraries/MySensors/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ sentence=Home Automation Framework
66
paragraph=Create your own wireless sensor mesh using NRF24L01+ and RFM69 radios running on Arduino or ESP8266. Over-the-air updates and MySensors support in 16+ home automation controllers.
77
category=Communication
88
url=http://www.mysensors.org
9-
architectures=avr,esp8266
9+
architectures=avr,esp8266,samd

0 commit comments

Comments
 (0)