When I was knee-high to Kernigan and Ritchie.......
Posted: Sat Aug 24, 2019 4:25 pm
When I first started coding decades ago, every program in C began with main(). Having gotten back in after decades off and working in the ESP IDF, all applications begin with app_main().
Is there a main() that calls app_main(), and if not, what calls app_main()? What does this caller do? I've grepped for "main()" in the IDF and was surprised at how many results there were. Which is the main(), if that is the first routine called that calls app_main(), and what does it do? I'm guessing it starts the scheduler as I see "Scheduler started" for both CPUs in my log traces. Is app_main just another task within FreeRTOS?
Is there anywhere where all this pre-application run-time setup is explained?
Thanks for any enlightenment.
Is there a main() that calls app_main(), and if not, what calls app_main()? What does this caller do? I've grepped for "main()" in the IDF and was surprised at how many results there were. Which is the main(), if that is the first routine called that calls app_main(), and what does it do? I'm guessing it starts the scheduler as I see "Scheduler started" for both CPUs in my log traces. Is app_main just another task within FreeRTOS?
Is there anywhere where all this pre-application run-time setup is explained?
Thanks for any enlightenment.