GPIO Tutorial : Build error. Undefined function.

Hi support team,

I am working on GPIO tutorial.   I got one compilation error.      I follow the tutorial's instruction to add m1_initialize_ioport to sensor_thread_entry.c file.    I cannot find this function anywhere including m1_cloud_driver.h.   There is another function called m1_initialize_comms in m1_cloud_driver.h.    Could the name have been changed?

Thank you,

Michael

 

16:12:43 **** Incremental Build of configuration Debug for project GPIO3 ****
make -j4 all
'Building file: ../src/synergy_gen/sensor_thread.c'
'Invoking: Cross ARM C Compiler'
C:\Renesas\e2_studio\eclipse\../Utilities/isdebuild arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O2 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wunused -Wuninitialized -Wall -Wextra -Wmissing-declarations -Wconversion -Wpointer-arith -Wshadow -Wlogical-op -Waggregate-return -Wfloat-equal -g3 -D_RENESAS_SYNERGY_ -DEX_16BIT_BUS -I"C:\Users\mikel\e2_studio\workspace\GPIO3\m1" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy_cfg\ssp_cfg\bsp" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy_cfg\ssp_cfg\driver" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\bsp" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\bsp\cmsis\Include" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\driver\api" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\driver\instances" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\src" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\src\synergy_gen" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy_cfg\ssp_cfg\framework" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\framework\api" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\framework\instances" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy_cfg\ssp_cfg\framework\el" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\framework\el" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\src\framework\el\ux" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\src\framework\el\tx" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\framework\el\nx" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\src\framework\el\nx" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\synergy\ssp\inc\framework\el\nx_application_layer" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\WiFi\include" -I"C:\Users\mikel\e2_studio\workspace\GPIO3\src\LCD" -std=c99 -MMD -MP -MF"src/synergy_gen/sensor_thread.d" -MT"src/synergy_gen/sensor_thread.o" -c -o "src/synergy_gen/sensor_thread.o" -x c "../src/synergy_gen/sensor_thread.c"
'Finished building: ../src/synergy_gen/sensor_thread.c'
' '
'Building target: GPIO3.elf'
'Invoking: Cross ARM C Linker'
arm-none-eabi-gcc @"GPIO3.elf.in"
./src/sensor_thread_entry.o: In function `sensor_thread_entry':
C:\Users\mikel\e2_studio\workspace\GPIO3\Debug/../src/sensor_thread_entry.c:84: undefined reference to `m1_initialize_ioport'
collect2.exe: error: ld returned 1 exit status
make: *** [GPIO3.elf] Error 1
makefile:88: recipe for target 'GPIO3.elf' failed

16:12:49 Build Failed. 3 errors, 0 warnings. (took 5s.603ms)

 

  • Hi Michael, did you download the latest M1 Synergy Cloud Driver ZIP file? It seems like you're still using the driver lib from smartchef demo.
  • In reply to Faheem:

    Hi Faheem,

    You are correct. I missed that part.

    I downloaded the files. m1_initialize_ioport function is defined in the new file. I built the new project successfully. I programmed the .srec file into the IOT board. I connected the button switch to the interrupt input pin and the LED's resister to the output pin.

    With Medium One flowchart completed, everything works very well. Whenever I pushed the button (a falling edge signal), the cloud detects the trigger and toggle the LED on/off.

    Now, the firmware is good and e2 studio is set. Downloading via jlink is also good. Thank you so much for your help.

    Best regards,
    Michael

  • In reply to Mike:

    Hi Michael, I'm glad that you got your cloud blinky going. It is a good start to the open world of IoT.
  • In reply to Faheem:

    Thank you so much to you and your team. You are right. I can't wait to do more. Have a great weekend!