3 Replies Latest reply on Jun 25, 2014 6:24 PM by SeyhanA_31

    Custom interrupts

      I want to use I2C interrupts (Wiced SDK 2.4.1), should I change anything in linker scripts? Are all interrupts handlers declared in vector_table_GCC.s (stm32f4xx mcu) available to use ?

        • 1. Re: Custom interrupts



          You are free update the Wiced SDK to handle any additional interrupts for your application.

          For I2C, please take a look at wiced_i2c_init(). You may add your own specific functionally on top of the provided Wiced methods as well.


          Hope it helps.


          • 2. Re: Custom interrupts

            While I'm trying to link DMA1_Stream2_irq and DMA1_Stream7_irq interrupt handlers I'm getting linker error:


            C:\Users\Jakub\Documents\WICED\WICED-SDK-2.4.1\Wiced-SDK\make.exe hexapod-SN8000x_STM32F4_Discovery-SPI download run

            Building Bootloader

            c:/users/jakub/documents/wiced/wiced-sdk-2.4.1/wiced-sdk/tools/arm_gnu/bin/win32/arm-none-eabi-ld.exe: build/waf_bootloader-NoOS-NoNS-SN8000x_STM32F4_Discovery-SPI/Binary/waf_bootloader-NoOS-NoNS-SN8000x_STM32F4_Discovery-SPI.elf section `.text3' will not fit in region `BTLDR_CODE'

            c:/users/jakub/documents/wiced/wiced-sdk-2.4.1/wiced-sdk/tools/arm_gnu/bin/win32/arm-none-eabi-ld.exe: region `BTLDR_CODE' overflowed by 23012 bytes

            make.exe[2]: *** [build/waf_bootloader-NoOS-NoNS-SN8000x_STM32F4_Discovery-SPI/Binary/waf_bootloader-NoOS-NoNS-SN8000x_STM32F4_Discovery-SPI.elf] Error 1

            make.exe[1]: *** [main_app] Error 2

            Makefile:244: recipe for target 'bootloader' failed

            make: *** [bootloader] Error 2


            Is it possible to not include interrupt handlers in bootloader code?

            • 3. Re: Custom interrupts



              Bootloader and application has different interrupt definitions. Since the changes are made in platform files, they are shared by bootloader and application as well. Since the bootloader is too big to fit in set location, it gives error.


              You may include the I2C interrupt definitions only when building the application.

              For example:

              Define ADD_I2C in application make file ".mk" by adding WICED_DEFINES += ADD_I2C

              Add #ifdef ADD_I2C to include I2C support only for building the application but not the bootloader.


              Hope it helps,


              1 of 1 people found this helpful