-->
Page 3 of 6

Re: gcc 8.2

PostPosted: Sun Apr 14, 2019 7:28 am
by davydnorris
Interesting about HAL - I'll check that in my code too!

Re: gcc 8.2

PostPosted: Sun Apr 14, 2019 8:48 am
by eriksl
Usually I'd go through any length to prevent using code from Espressif (or even just compiled by them), I've seen their code and it's horrible, no robustness to be expected there. But in this case they very probably just compiled the stuff and put it into the ROM, so I guess it can't hurt that much. Also I don't think much code will actually use it, maybe the C compiler itself or the libc?

Re: gcc 8.2

PostPosted: Sun Apr 14, 2019 8:49 pm
by davydnorris
So I checked my link map and I'm pulling in only one function from libhal:

int_asm--set_intclear.o

not sure where this one is being pulled in from, but quite possibly it's in the I2S code, as that would be the only one you're not using

Re: gcc 8.2

PostPosted: Mon Apr 15, 2019 11:44 am
by eriksl
That's interesting, because masking/unmasking interrupts is very much possible without using the hal functions.

There is an option to ld to have it generate a cross-reference as well, that would (in theory) show what file/function is using the function. It could indeed very well be some obscure SDK function.

I did a little research on the I2S stuff. Unluckily (for us) very little is revealed about the direct (i.e. register level) access to this module. So we end up calling SDK functions that do mysterious things under the hood. I'm shivering already again. I have no real use for I2C at the moment (other then a possible replacement for led pixel protocol output, instead of abusing one of the UARTS), so I am lucky I guess. If someone has more information about "bare metal" access to I2S, that would be great.

What are you using I2S for, actually recording or playing audio?