ESP8266 : 'Firmware' keine echte Firmware?

Gast #4146271
Lesenswert?

hi

bitte keine gegenfrage, was ich unter echter firmware verstehe.
ich kenne halt ein hex file anders her.

mal ne frage die mich seit beginn der esp zeit beschäftigt,
aber die ich immer wieder beiseite gelegt hatte,
da ich compiler einstellungen vermute und weil ich technisch
dazu nicht in der lage bin, es mir verständlich zu vormulieren,
wenn es keine wären.

warum ist in der firmware eigentlich soviel text klar zu lesen,
wird die firmware interpretiert? arbeitet da ein interpreter?
oder warum kann ich da meinen 'namen' und auch ganze api befehle lesen, 
wenn ich sage

os_sprintf(";-)");

;-)
Gast #4146767
Lesenswert?

Pete K. schrieb:
> Weil es ein Code-Segment und ein Text-Segment gibt. Und in dem
> Text-Segment legt der Linker die Strings ab.

sorry für das nachbohren:
kann ich das entscheiden, ob mein text in ein text segment wandert,
ob er komprimiert werden soll ( wäre doch super ) ..

oder steuern durch code anpassung?

z.B. anstatt

at_port_print("hallo");



base64 hallo  aGFsbG8=

-------------------------
1
..
2

3
// das wäre wahrscheinlich kontraproduktiv..
4
// #define gruss "aGFsbG8=" 
5

6

7
..
8

9

10
extern base64_decode (uint8 *buffer); // lib ... tools
11

12
uint8 msg [64];
13

14
void clear (uint8 *buffer) {
15

16
os_sprintf(msg,"%s\r\n",decode(buffer));
17
at_port_print(msg);
18

19
}
20

21

22
unsigned char decode (uint8 *buffer) {
23

24
return base64_decode(buffer);
25

26
}
27

28

29

30
user_main{
31

32
uint8 box[64];
33

34
// os_sprintf(box,"%s\r\",clear(gruss));
35
os_sprintf(box,"%s\r\",clear("aGFsbG8="));
36
at_port_print(box);
37

38

39
}
40

41
..
Gast #4146785
Lesenswert?

btw:
zitat:

"-mtext-section-literals
-mno-text-section-literals
    Control the treatment of literal pools. The default is 
-mno-text-section-literals, which places literals in a separate section 
in the output file. This allows the literal pool to be placed in a data 
RAM/ROM, and it also allows the linker to combine literal pools from 
separate object files to remove redundant literals and improve code 
size. With -mtext-section-literals, the literals are interspersed in the 
text section in order to keep them as close as possible to their 
references. This may be necessary for large assembly files. "

src: https://gcc.gnu.org/onlinedocs/gcc-4.8.1/gcc/Xtensa-Options.html

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren