File size: 684 Bytes
f2878d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Embeds model.bin and vocab.bin in flash (.rodata, MMU-mapped) when the ESP-IDF component is built
// with CONFIG_TINYDECIDE_EMBED_MODEL (CMakeLists.txt defines TINYDECIDE_EMBED and the include path).
// The PIE kernel loads 128-bit words, so the model starts on a 16-byte boundary; all Q4 offsets
// inside it are multiples of 16 (checked by tools/pack.mjs).
#if defined(TINYDECIDE_EMBED)
    .section .rodata.td_model, "a"
    .balign 16
    .global td_model_bin
td_model_bin:
    .incbin "model.bin"
    .global td_model_bin_end
td_model_bin_end:
    .balign 16
    .global td_vocab_bin
td_vocab_bin:
    .incbin "vocab.bin"
    .global td_vocab_bin_end
td_vocab_bin_end:
#endif