Skip to content

Commit 8bd821f

Browse files
microbit-carlosmbrossard
authored andcommitted
intelhex: Increase optimisation level to O3 for this file only.
1 parent 88d64cb commit 8bd821f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

source/daplink/drag-n-drop/intelhex.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@
2424
#include "intelhex.h"
2525
#include "cmsis_compiler.h"
2626

27+
#if defined(__CC_ARM)
28+
#pragma push
29+
#pragma O3
30+
#pragma Otime
31+
#elif defined(__GNUC__) && !defined(__ARMCC_VERSION)
32+
#pragma GCC push_options
33+
#pragma GCC optimize("O3")
34+
#endif
35+
2736
typedef enum hex_record_t hex_record_t;
2837
enum hex_record_t {
2938
DATA_RECORD = 0,
@@ -261,3 +270,9 @@ hexfile_parse_status_t parse_hex_blob(const uint8_t *hex_blob, const uint32_t he
261270
*hex_parse_cnt = (uint32_t)(hex_blob_size - (end - hex_blob));
262271
return status;
263272
}
273+
274+
#if defined(__CC_ARM)
275+
#pragma pop
276+
#elif defined(__GNUC__) && !defined(__ARMCC_VERSION)
277+
#pragma GCC pop_options
278+
#endif

0 commit comments

Comments
 (0)