Skip to content

Commit

Permalink
intelhex: Increase optimisation level to O3 for this file only.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos authored and mathias-arm committed Mar 16, 2023
1 parent 9e32454 commit 64cf6e8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions source/daplink/drag-n-drop/intelhex.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
#include "intelhex.h"
#include "cmsis_compiler.h"

#if defined(__CC_ARM)
#pragma push
#pragma O3
#pragma Otime
#elif defined(__GNUC__) && !defined(__ARMCC_VERSION)
#pragma GCC push_options
#pragma GCC optimize("O3")
#endif

typedef enum hex_record_t hex_record_t;
enum hex_record_t {
DATA_RECORD = 0,
Expand Down Expand Up @@ -261,3 +270,9 @@ hexfile_parse_status_t parse_hex_blob(const uint8_t *hex_blob, const uint32_t he
*hex_parse_cnt = (uint32_t)(hex_blob_size - (end - hex_blob));
return status;
}

#if defined(__CC_ARM)
#pragma pop
#elif defined(__GNUC__) && !defined(__ARMCC_VERSION)
#pragma GCC pop_options
#endif

0 comments on commit 64cf6e8

Please sign in to comment.