Skip to content

Commit 66563a7

Browse files
committed
Signed-off-by: Awar Abdulkarim <[email protected]>
1 parent b3194d8 commit 66563a7

File tree

3 files changed

+43
-1
lines changed

3 files changed

+43
-1
lines changed

furi/core/log.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,21 @@ bool furi_log_level_from_string(const char* str, FuriLogLevel* level);
133133
* @param format The format
134134
* @param ... VA Args
135135
*/
136+
#ifndef FURI_LOG_E
136137
#define FURI_LOG_E(tag, format, ...) printf("[E][%s] " format "\r\n", tag, ##__VA_ARGS__)
138+
#endif
139+
140+
#ifndef FURI_LOG_W
137141
#define FURI_LOG_W(tag, format, ...) printf("[W][%s] " format "\r\n", tag, ##__VA_ARGS__)
142+
#endif
143+
144+
#ifndef FURI_LOG_I
138145
#define FURI_LOG_I(tag, format, ...) printf("[I][%s] " format "\r\n", tag, ##__VA_ARGS__)
146+
#endif
147+
148+
#ifndef FURI_LOG_D
139149
#define FURI_LOG_D(tag, format, ...) printf("[D][%s] " format "\r\n", tag, ##__VA_ARGS__)
150+
#endif
140151

141152
#ifdef __cplusplus
142153
}

furi/furi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include <stdbool.h>
44
#include "core/check.h"
55

6-
// Import log functions rather than defining them here
6+
// Include log.h instead of redefining macros
77
#include "core/log.h"
88

99
// Define function prototypes needed by applications

minimal_build.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Create protobuf version file to avoid git tag errors
4+
echo "#pragma once" > build/f7-firmware-D/assets/compiled/protobuf_version.h
5+
echo "#define PROTOBUF_VERSION \"0.1.0-minimal\"" >> build/f7-firmware-D/assets/compiled/protobuf_version.h
6+
7+
# Copy it to the standard location as well
8+
mkdir -p assets/compiled
9+
cp build/f7-firmware-D/assets/compiled/protobuf_version.h assets/compiled/
10+
11+
# Create a proper furi.h that doesn't conflict with log.h
12+
cat > furi/furi.h << 'EOF'
13+
#pragma once
14+
#include <stdint.h>
15+
#include <stdbool.h>
16+
#include "core/check.h"
17+
18+
// Include log.h instead of redefining macros
19+
#include "core/log.h"
20+
21+
// Define function prototypes needed by applications
22+
void furi_delay_ms(uint32_t ms);
23+
24+
// Utility macros
25+
#define UNUSED(x) (void)(x)
26+
EOF
27+
28+
# Make the script executable
29+
chmod +x ./fbt
30+
31+
echo "Minimal build setup complete - now try running ./fbt fap_container_test"

0 commit comments

Comments
 (0)