Meisterschulen-am-Ostbahnhof-Munchen / ISOAgLib

Other
16 stars 8 forks source link

Assertion `isRegistered()' failed. #1

Open Kuzma30 opened 1 year ago

Kuzma30 commented 1 year ago

I am trying to use ISOAgLib on custom CM4 based board (with CAN, RS232 and external Flash memory) with Linux system. My isoaglib_project_config.h `

ifndef INCLUDED_FROM_ISOAGLIB_CONFIG

error Do not include this file directly!

endif

// These defines are needed for inclusion of the correct HAL modules:

define HAL_PATH_ISOAGLIB IsoAgLib/hal/pc

define HAL_PATH_ISOAGLIB_SYSTEM IsoAgLib/hal/pc/system

define HAL_PATH_ISOAGLIB_CAN IsoAgLib/hal/pc/can

define HAL_PATH_SUPPLEMENTARY_EEPROM supplementary_driver/hal/pc/eeprom

define HAL_PATH_SUPPLEMENTARY_RS232 supplementary_driver/hal/pc/rs232

define HAL_PATH_SUPPLEMENTARY_OUTPUTS supplementary_driver/hal/pc/outputs

define HAL_PATH_SUPPLEMENTARY_INPUTS supplementary_driver/hal/pc/inputs

define HAL_PATH_SUPPLEMENTARY_DATASTREAMS supplementary_driver/hal/pc/datastreams

// Switches // Defining number of instances and channels:

define CAN_INSTANCE_CNT 1

define PRT_INSTANCE_CNT 1

define RS232_CHANNEL_CNT 1

define RS232_INSTANCE_CNT 1

define USE_ISO_11783

define DEF_Stream_h_IMPL streamchunk_c.h

define DEF_Stream_c_IMPL StreamChunk_c

define USE_RS232 1

`

On main.cpp I have such init line ` ... // Init System IsoAgLib::getIsystemInstance().init();

   // Initialize ISOAgLib
   getISchedulerInstance().init();

   // Initialize CAN-Bus
   getCanInstance().init (0, 250 ); // CAN-Bus can0 (with defaulting 250 kbit)

  myIdent.init(myECUISOName, myDatastorage, -1, NULL, false);
   getIIsoBusInstance().init(0);
   getIisoMonitorInstance().registerIdentItem(myIdent);

... ` Where iIsoName_c myECUISOName(ab_selfConf, aui8_indGroup, aui8_devClass, aui8_devClassInst, ab_func, aui16_manufCode, aui32_serNo, ab_funcInst, ab_ecuInst); iIdentItem_c myIdent;

When I run my code it stop with assert /home/qtemb/FertiGUI/ISOAgLib/library/xgpl_src/IsoAgLib/scheduler/impl/schedulertask_c.cpp:58: void __IsoAgLib::SchedulerTask_c::setNextTriggerTime(ecutime_t): AssertionisRegistered()' failed. quit `

What code I need add to resolve this (or it is error in my config)?

f-hoepfinger-hr-agrartechnik commented 1 year ago

Hi, 

i would want to support you. 

how could i get one of your Boards ? 

also can you please push your Project to some Git Repo ? 

then i am sure it is a small issue.

Kuzma30 commented 1 year ago

how could i get one of your Boards ? 

also can you please push your Project to some Git Repo ? 

Board and project under development. But you can test on Rpi4 + CAN HAT.

franz-ms-muc commented 1 year ago

Hi, 

Which can Hat ? 

https://www.waveshare.com/catalogsearch/result/?q=can+hat

also R Pi 4 Standard ?

Kuzma30 commented 1 year ago

I use RS485 CAN HAT for Raspberry Pi and RPi4.

franz-ms-muc commented 1 year ago

https://www.waveshare.com/rs485-can-hat.htm

this one ?

Kuzma30 commented 1 year ago

Yes

franz-ms-muc commented 1 year ago

i also ordered this one: https://www.seeedstudio.com/CAN-BUS-FD-HAT-for-Raspberry-Pi-p-4742.html

it has MCP2518FD on it, might perform much better (has FIFO, while MCP2515 has not)

also i think about using Beaglebone Black for one Project, it does not need External CAN Controller, it has NATIVE CAN.