AnsweredAssumed Answered

JN-AN-1218 build problems

Question asked by youpko on Mar 6, 2019
Latest reply on Apr 26, 2019 by Mario Ignacio Castaneda Lopez

I success fully compiled the JN-AN-1218 with the following configuration

make LIGHT=DimmableLight JENNIC_CHIP_FAMILY=JN516x JENNIC_CHIP=JN5168 DR=DR1175 TRACE=1 GP_SUPPORT=0 GP_DEVICE=COMBO_BASIC OTA=0 TOUCHLINK=1

 

But I want to implement my own DriverBulb interface, so i started with the DriverBulb_JN516X.c as a reference. Tried compiling that with:

make LIGHT=DimmableLight JENNIC_CHIP_FAMILY=JN516x JENNIC_CHIP=JN5168 DR=JN516X TRACE=1 GP_SUPPORT=0 GP_DEVICE=COMBO_BASIC OTA=0 TOUCHLINK=1

But that wont compile The linker gives an error:

../../DimmableLight/Build/irq_JN516x.o:(.text+0x4c): undefined reference to `vISR_SystemController'

But as far as I can tell the DriverBulb_JN516X.c has no correlation with "vISR_SystemController"

 

So commened out the folowing lines in "irq_JN516x.s" and left everyting else as how it was.

.globl  PIC_SwVectTable
    #.extern vISR_SystemController
PIC_SwVectTable:
    #.word vISR_SystemController             # 15

 

Compiled it with the same command as above. and that completes without any errors.

So the next step was to program the "DimmableLight_JN5168_JN516X.bin" into the JN5168-001-M00 module.

 

But i get the following in the serial output.

***********************************************
* LIGHT NODE RESET                            *
***********************************************
APP: Entering APP_vInitResources()
APP: Initialising resources...
APP_vInitialiseNode
eStatusReportReload = 0

Zll recovered state 00

 eCLD_ScenesCreateScenes: eCLD_ScenesCountScenes() u8SceneCount = 1MAKE Reportable ep 1
Cluster 0006 Attribute 0000 Min 1 Max 61 IntV 0 Direct 0 Change 0
Cluster 0008 Attribute 0000 Min 1 Max 61 IntV 0 Direct 0 Change 10

Set a random pan

Factory new start up
PDM: Capacity 29
PDM: Occupancy 34
APP: Entering BDB_vStart()
BDB: Disc on Ch 11 from 0x02108800
APP: Entering APP_vMainLoop()
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 15 from 0x02108800
BDB: ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: vNsTryNwkJoin - index 0 of 0 Nwks
BDB: No suitable network! Continue Discovery
BDB: Disc on Ch 20 from 0x02108800
BDB: ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 25 from 0x02108800
BDB: ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 12 from 0x05ef7000
BDB: ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 13 from 0x05ef7000
BDB: ZCL Event 6
BDB: APP_vGenCallback [0 10]
BDB: Disc on Ch 14 from 0x05ef7000
BDB: ZCL Event 6

!!! Bus error
u32PICMR = 0 : u32PICSR = 8008
u32PICMSR = 0 : u32IPMR = 0
u32IHPR = c : u32AINT = 8008 u32PINT 0
EPCR = ad444 : EEAR = 2001f00
Stack dump:
 4007f58 : 00000002
 4007f5c : 00083237
 4007f60 : 00000006
 4007f64 : 000ad444
 4007f68 : 02001f00
 4007f6c : 00000000
 4007f70 : 0000000c
 4007f74 : 00000000
 4007f78 : 00008008
 4007f7c : 00000000
 4007f80 : 00000000
 4007f84 : 00008008
 4007f88 : 0000005a
 4007f8c : 000832a2
 4007f90 : 00000006
 4007f94 : 0008488a
 4007f98 : 00000002
 4007f9c : 00084589
 4007fa0 : 00000000
 4007fa4 : 00000000
 4007fa8 : 00000000
 4007fac : 00000000
 4007fb0 : 00000000
 4007fb4 : 00000000
 4007fb8 : 00000000
 4007fbc : 00000000
 4007fc0 : 00000000
 4007fc4 : 00000000
 4007fc8 : 00000000
 4007fcc : 00000000
 4007fd0 : 00000000
 4007fd4 : 000854ce
 4007fd8 : 00000000
 4007fdc : 00000003
 4007fe0 : 00000002
 4007fe4 : 00083387
 4007fe8 : 00000002
 4007fec : 00000a5b
 4007ff0 : 00000000
 4007ff4 : 00000000
 4007ff8 : 00091d35
 4007ffc : 76543210

 

So that stack dump clearly indicates that commeting out those lines was not the correct way to fix this.

 

I also tried to just stub out "vISR_SystemController" in the source file. (just implement the function but with no code in the body)

 

but that still gives the !!! Bus error stack dump.

 

How should I proceed to adapt the example code to my application?

Outcomes