> You can always set the MAC address in your application at any time after > booting using > https://github.com/apache/incubator-nuttx-apps/blob/master/netutils/netlib/netlib_setmacaddr.c <https://github.com/apache/incubator-nuttx-apps/blob/master/netutils/netlib/netlib_setmacaddr.c> > or similar logic in-line in your applilcation.
Yes I saw this, but it does not seem a very good option to me. It requires you to set up the hardware in the application, and does not seem very efficient. I was expecting to have the hardware/board initialization routines to properly set-up the hardware and have it ready for usage for the application. Usually the board initialization has direct access to the low-level drivers for this exact reason. Also, as I see, now the MAC peripheral has essentially to be initialized twice. Once with no MAC address, and again with the correct address. Στις Κυρ, 2 Αυγ 2020 στις 6:03 μ.μ., ο/η Gregory Nutt <spudan...@gmail.com> έγραψε: > > > Thank you both. I followed the example of same70-xplained, and > essentially > > I do the exact same thing. > > > > However, as I get it, the final step would be to call stm32_macaddress() > to > > set the address to the MAC. > > This function takes as an argument a struct stm32_ethmac_s which is > private > > to the stm32_eth driver. > > > > So I understand that I cannot set the MAC address within the board > > initialization. > > > > Is there any other way? Or maybe this function shall be changed to: > > void stm32_macaddress(int intf); > > > You can always set the MAC address in your application at any time after > booting using > > https://github.com/apache/incubator-nuttx-apps/blob/master/netutils/netlib/netlib_setmacaddr.c > or similar logic in-line in your applilcation. >