[Gnuk-users] Porting Chopstx (and later Gnuk) to STM32L432

Aurelien Jarno aurelien at aurel32.net
Thu Nov 16 10:20:25 UTC 2017


On 2017-11-16 13:20, NIIBE Yutaka wrote:
> Hello,
> 
> Aurelien Jarno <aurelien at aurel32.net> wrote:
> > * USB interrupt: currently the USB interrupt is hardcoded to IRQ 20. I
> > plan to add a #define in mcu/sys-*.h. That would also remove the #ifdef
> > in src/usb-ccid.c for the GNU_LINUX_EMULATION.
> 
> I put IRQ_REQ_USB in usb_lld.h.  Conceptually, mcu/sys-*.h is for the
> SYS service.  usb_lld.h is more relevant.

Thanks. On my side I have been busy on other things, so I haven't
touched at GnuK at all. I still plan to work on adding support for
STM32L432 in the future though.

About the change my goal in putting it in mcu/sys-*.h was to be able to
use the same implementation for different microcontrollers. The
STM32F103 and STM32L432 share the same USB IP, but the STM32F103 has
it mapped to IRQ 20, while the STM32L432 has it mapped ot IRQ 67. Maybe
the best for that would be to put it instead in mcu/stm32f103.h and
mcu/stm32l432.h? I am personally not a big fan of too many #ifdef
#endif.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien at aurel32.net                 http://www.aurel32.net



More information about the gnuk-users mailing list