Skip to content

Commit 4fbb4ba

Browse files
committed
linker.lf
1 parent 46f9c25 commit 4fbb4ba

File tree

11 files changed

+163
-0
lines changed

11 files changed

+163
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/esp-idf/

boards/MICROLITE/main/linker.lf

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This fixes components/esp_ringbuf/linker.lf to allow us to put non-ISR ringbuf functions in flash.
2+
3+
# Requires that both RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
4+
# are set to "n" (which is the default), otherwise this would result in duplicate section config
5+
# when resolving the linker fragments.
6+
7+
# The effect of this file is to leave the ISR functions in RAM (which we require), but apply a fixed
8+
# version of RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y (leaving out prvGetFreeSize and prvGetCurMaxSizeByteBuf)
9+
# See https://github.com/espressif/esp-idf/issues/13378
10+
11+
[mapping:esp_ringbuf_fix]
12+
archive: libesp_ringbuf.a
13+
entries:
14+
# This is exactly the list of functions from RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y,
15+
# but with prvGetFreeSize and prvGetCurMaxSizeByteBuf removed.
16+
ringbuf: prvGetCurMaxSizeNoSplit (default)
17+
ringbuf: prvGetCurMaxSizeAllowSplit (default)
18+
ringbuf: prvInitializeNewRingbuffer (default)
19+
ringbuf: prvReceiveGeneric (default)
20+
ringbuf: vRingbufferDelete (default)
21+
ringbuf: vRingbufferGetInfo (default)
22+
ringbuf: vRingbufferReturnItem (default)
23+
ringbuf: xRingbufferAddToQueueSetRead (default)
24+
ringbuf: xRingbufferCanRead (default)
25+
ringbuf: xRingbufferCreate (default)
26+
ringbuf: xRingbufferCreateStatic (default)
27+
ringbuf: xRingbufferCreateNoSplit (default)
28+
ringbuf: xRingbufferReceive (default)
29+
ringbuf: xRingbufferReceiveSplit (default)
30+
ringbuf: xRingbufferReceiveUpTo (default)
31+
ringbuf: xRingbufferRemoveFromQueueSetRead (default)
32+
ringbuf: xRingbufferSend (default)
33+
ringbuf: xRingbufferSendAcquire (default)
34+
ringbuf: xRingbufferSendComplete (default)
35+
ringbuf: xRingbufferPrintInfo (default)
36+
ringbuf: xRingbufferGetMaxItemSize (default)
37+
ringbuf: xRingbufferGetCurFreeSize (default)
38+
39+
# Everything else will have the default rule already applied (i.e. noflash_text).

boards/MICROLITE_C3/main/linker.lf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for C3, see main_esp32/linker.lf).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for C3, see main_esp32/linker.lf).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for S2, see main_esp32/linker.lf).

boards/MICROLITE_S3/main/linker.lf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for S3, see main_esp32/linker.lf).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for S3, see main_esp32/linker.lf).
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Empty linker fragment (no workaround required for S3, see main_esp32/linker.lf).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This fixes components/esp_ringbuf/linker.lf to allow us to put non-ISR ringbuf functions in flash.
2+
3+
# Requires that both RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
4+
# are set to "n" (which is the default), otherwise this would result in duplicate section config
5+
# when resolving the linker fragments.
6+
7+
# The effect of this file is to leave the ISR functions in RAM (which we require), but apply a fixed
8+
# version of RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y (leaving out prvGetFreeSize and prvGetCurMaxSizeByteBuf)
9+
# See https://github.com/espressif/esp-idf/issues/13378
10+
11+
[mapping:esp_ringbuf_fix]
12+
archive: libesp_ringbuf.a
13+
entries:
14+
# This is exactly the list of functions from RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y,
15+
# but with prvGetFreeSize and prvGetCurMaxSizeByteBuf removed.
16+
ringbuf: prvGetCurMaxSizeNoSplit (default)
17+
ringbuf: prvGetCurMaxSizeAllowSplit (default)
18+
ringbuf: prvInitializeNewRingbuffer (default)
19+
ringbuf: prvReceiveGeneric (default)
20+
ringbuf: vRingbufferDelete (default)
21+
ringbuf: vRingbufferGetInfo (default)
22+
ringbuf: vRingbufferReturnItem (default)
23+
ringbuf: xRingbufferAddToQueueSetRead (default)
24+
ringbuf: xRingbufferCanRead (default)
25+
ringbuf: xRingbufferCreate (default)
26+
ringbuf: xRingbufferCreateStatic (default)
27+
ringbuf: xRingbufferCreateNoSplit (default)
28+
ringbuf: xRingbufferReceive (default)
29+
ringbuf: xRingbufferReceiveSplit (default)
30+
ringbuf: xRingbufferReceiveUpTo (default)
31+
ringbuf: xRingbufferRemoveFromQueueSetRead (default)
32+
ringbuf: xRingbufferSend (default)
33+
ringbuf: xRingbufferSendAcquire (default)
34+
ringbuf: xRingbufferSendComplete (default)
35+
ringbuf: xRingbufferPrintInfo (default)
36+
ringbuf: xRingbufferGetMaxItemSize (default)
37+
ringbuf: xRingbufferGetCurFreeSize (default)
38+
39+
# Everything else will have the default rule already applied (i.e. noflash_text).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This fixes components/esp_ringbuf/linker.lf to allow us to put non-ISR ringbuf functions in flash.
2+
3+
# Requires that both RINGBUF_PLACE_FUNCTIONS_INTO_FLASH and RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH
4+
# are set to "n" (which is the default), otherwise this would result in duplicate section config
5+
# when resolving the linker fragments.
6+
7+
# The effect of this file is to leave the ISR functions in RAM (which we require), but apply a fixed
8+
# version of RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y (leaving out prvGetFreeSize and prvGetCurMaxSizeByteBuf)
9+
# See https://github.com/espressif/esp-idf/issues/13378
10+
11+
[mapping:esp_ringbuf_fix]
12+
archive: libesp_ringbuf.a
13+
entries:
14+
# This is exactly the list of functions from RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y,
15+
# but with prvGetFreeSize and prvGetCurMaxSizeByteBuf removed.
16+
ringbuf: prvGetCurMaxSizeNoSplit (default)
17+
ringbuf: prvGetCurMaxSizeAllowSplit (default)
18+
ringbuf: prvInitializeNewRingbuffer (default)
19+
ringbuf: prvReceiveGeneric (default)
20+
ringbuf: vRingbufferDelete (default)
21+
ringbuf: vRingbufferGetInfo (default)
22+
ringbuf: vRingbufferReturnItem (default)
23+
ringbuf: xRingbufferAddToQueueSetRead (default)
24+
ringbuf: xRingbufferCanRead (default)
25+
ringbuf: xRingbufferCreate (default)
26+
ringbuf: xRingbufferCreateStatic (default)
27+
ringbuf: xRingbufferCreateNoSplit (default)
28+
ringbuf: xRingbufferReceive (default)
29+
ringbuf: xRingbufferReceiveSplit (default)
30+
ringbuf: xRingbufferReceiveUpTo (default)
31+
ringbuf: xRingbufferRemoveFromQueueSetRead (default)
32+
ringbuf: xRingbufferSend (default)
33+
ringbuf: xRingbufferSendAcquire (default)
34+
ringbuf: xRingbufferSendComplete (default)
35+
ringbuf: xRingbufferPrintInfo (default)
36+
ringbuf: xRingbufferGetMaxItemSize (default)
37+
ringbuf: xRingbufferGetCurFreeSize (default)
38+
39+
# Everything else will have the default rule already applied (i.e. noflash_text).

0 commit comments

Comments
 (0)