<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks a lot for checking this out, Mark! I’m sorry to bother you with these things that probably are very trivial to you. I hope you don’t mind.<div class=""><br class=""><div class="">So… In addition to the things you mention, I found out that I did not have the correct ESP-IDF. I had the espressif-version. I still haven’t got the grips on GIT, so that’s probably the reason for that, and most of the problems I’m having :-D</div><div class="">Anyway, I have cloned the open vehicle/esp-idf now and I have pulled the latest build tree for ohms v3, but when i run <i class="">make</i> it fails with this message:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal; font-family: Menlo; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><b class="">/Users/goev/Prosjekter/ovms3/Open-Vehicle-Monitoring-System-3/vehicle/OVMS.V3/main/./ovms_module.cpp:39:41:</b> </span><span style="font-variant-ligatures: no-common-ligatures; color: #c33720" class=""><b class="">fatal error: </b></span><span style="font-variant-ligatures: no-common-ligatures" class="">freertos/heap_regions_debug.h: No such file or directory</span></div></div><div class=""><br class=""></div><div class="">I can’t find <b class=""><i class="">heap_regions_debug.h & .c</i> </b>in <i class="">openvehicles/esp-idf</i> nor in <i class="">espressif/esp-idf</i>. Do you have those locally on your computer? </div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Geir</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">1. des. 2017 kl. 01:52 skrev Mark Webb-Johnson <<a href="mailto:mark@webb-johnson.net" class="">mark@webb-johnson.net</a>>:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I can’t repeat the issue. Here is what I did:<div class=""><br class=""></div><div class=""><ol class="MailOutline"><li class="">Bring your vehicle_kiasoulev into the latest build tree for ovms v3.<br class=""><br class=""></li><li class="">Change<br class="">#include “esp_log.h"<br class="">to<br class="">#include "ovms_log.h"<br class=""><br class=""></li><li class="">Remove:<br class="">MyEvents.RegisterEvent(TAG, "ticker.1", std::bind(&OvmsVehicleKiaSoulEv::Ticker1, this, _1, _2));<br class=""><br class="">and change:<br class="">OvmsVehicleKiaSoulEv::Ticker1(std::string event, void* data)<br class="">to<br class="">OvmsVehicleKiaSoulEv::Ticker1(uint32_t ticker)<br class=""><br class=""></li><li class="">Add an ESP_LOGI diagnostic trace to Ticker1 and SetChargeMetrics<br class=""><br class=""></li><li class="">In the constructor, set:<br class="">ks_charge_bits.ChargingJ1772 = true;<br class="">ks_charge_bits.ChargingChademo = true;<br class="">and removed the comment-out in SetChargeMetrics</li></ol><div class=""><br class=""></div><div class="">Here is the output that I get:</div><div class=""><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > level info</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">Logging level for * set to info<br class=""><br class=""></span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">OVMS > vehicle module KS</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (9235) v-kiasoulev: Kia Soul EV v3.0 vehicle module</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (10035) v-kiasoulev: Ticker1 ks_charge_bits.ChargingJ1772=1 ks_charge_bits.ChargingChademo=1</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (10035) v-kiasoulev: SetChargeMetrics V=230.000000 C=0.000000 CL=28.695652 CHADEMO=0</span></font></div><div class=""><font face="Andale Mono" class=""><span style="font-size: 18px;" class="">I (10035) v-kiasoulev: Aux Battery voltage low</span><br class=""><br class=""><span style="font-size: 18px;" class="">OVMS > metrics list v.c.mode</span><br class=""><span style="font-size: 18px;" class="">v.c.mode                                 standard</span><br class=""><br class=""><span style="font-size: 18px;" class="">OVMS > metrics list v.c.type</span><br class=""><span style="font-size: 18px;" class="">v.c.type                                 type1</span><br class=""><br class=""><div class=""><span style="font-size: 18px;" class="">OVMS > metrics list v.c.vol</span></div><div class=""><span style="font-size: 18px;" class="">v.c.voltage                              230V</span></div></font></div></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">Are you sure you are running against the ‘latest’ openvehicles/esp-idf (2.1 branch) and openvehicles/ovmsv3 (master branch)?</div><div class=""><br class=""></div><div class="">You can try to menuconfig Components -> ESP32 -> Panic Handler Behaviour -> Invoke GDBStub (to get a better stack trace and diagnostic capability).</div><div class=""><br class=""></div><div class="">Going forward, it is probably easiest to merge in what you have with our master github, and tidy up the integration a bit (stuff like the ovms_log.h not esp_log.h, the Ticker1 event, etc); that way we keep you up-to-date with framework (in particular vehicle.{h,cpp}) changes. Shall I do that now? Based on your master or pr/5 branch?</div><div class=""><br class=""></div><div class="">Regards, Mark.</div><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 27 Nov 2017, at 4:18 PM, Geir Øyvind Vælidalo <<a href="mailto:geir@validalo.net" class="">geir@validalo.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Ok, Mark, I've committed my latest version to<br class=""><a href="https://github.com/goev/Open-Vehicle-Monitoring-System-3" class="">https://github.com/goev/Open-Vehicle-Monitoring-System-3</a><br class="">Everything I've done is in vehicle_kiasoulev.<br class=""><br class="">I set the charge mode in a function called SetChargeMetrics. It is called<br class="">from Ticker1 when ks_charge_bits.ChargingJ1772 or<br class="">ks_charge_bits.ChargingChademo is true.<br class="">(Un)fortunately ks_charge_bits is uninitialized and probably contains some<br class="">garbage, so it usually fires the call to SetChargeMetrics when running<br class="">"vehicle module KS"<br class="">even when not connected to the car. I need to set a default value to the<br class="">ks_charge_bits and probab some more ks_-variables in the constructor, but<br class="">I haven't come that yet.<br class=""><br class="">NB! In SetChargeMetrics, I've commented out the charge mode-line, so you<br class="">need to remove the comment-tag and comment.<br class=""><br class="">Yesterday I also found out that ms_v_charge_state gives similar problems.<br class="">It was *really* late, so I didn't look to close into it, but it seemed<br class="">related.<br class="">I've added a macro in vehicle_kiasoulev.h called SET_CHARGE_STATE where<br class="">I've commented out the setting of the charge state, in case you find time<br class="">to look into that too.<br class=""><br class="">Thanks!<br class=""><br class="">Geir<br class=""><br class=""><br class=""><blockquote type="cite" class="">Really need to see the overall context of this. Where are you calling the<br class="">ms_v_charge_mode->SetValue from?<br class=""><br class="">Probably easiest to commit what you have to your own github clone, then<br class="">let us know where that is and we can see the whole thing.<br class=""><br class="">Regards, Mark.<br class=""><br class=""><blockquote type="cite" class="">On 26 Nov 2017, at 4:35 AM, Geir Øyvind Vælidalo <<a href="mailto:geir@validalo.net" class="">geir@validalo.net</a>><br class="">wrote:<br class=""><br class="">I’m having problems setting ms_v_charge_mode.<br class="">I do it this way, but it fails at runtime:<br class=""><br class="">  StdMetrics.ms_v_charge_mode->SetValue( chademo ? "performance" :<br class="">"standard");<br class=""><br class="">This is the trace I get, so it seems to fail somewhere else:<br class=""><br class="">I (6451) events: Signal(vehicle.charge.mGuru Meditation Error of type<br class="">LoadProhibited occurred on core  0. Exception was unhandled.<br class="">Register dump:<br class="">PC      : 0x400883c3  PS      : 0x00060633  A0      : 0x8008708a  A1<br class=""> : 0x3ffc6b30<br class="">0x400883c3: vListInsertEnd at<br class="">/Users/goev/esp/esp-idf/components/freertos/./list.c:130<br class=""><br class="">A2      : 0x3ffc6384  A3      : 0x3ffc6c78  A4      : 0x00060620  A5<br class=""> : 0x00000000<br class="">A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000038  A9<br class=""> : 0x3ffb33b8<br class="">A10     : 0x3ffb131c  A11     : 0x00060623  A12     : 0x00060623  A13<br class=""> : 0x3ffce1ec<br class="">A14     : 0x3ffce1ec  A15     : 0x3ffc6a70  SAR     : 0x00000010<br class="">EXCCAUSE: 0x0000001c<br class="">EXCVADDR: 0x00000040  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT<br class=""> : 0xfffffffa<br class=""><br class="">Backtrace: 0x400883c3:0x3ffc6b30 0x40087087:0x3ffc6b50<br class="">0x400860f1:0x3ffc6b70 0x4008771b:0x3ffc6b90 0x40087818:0x3ffc6bc0<br class="">0x400883c3: vListInsertEnd at<br class="">/Users/goev/esp/esp-idf/components/freertos/./list.c:130<br class=""><br class="">0x40087087: vTaskPlaceOnEventListRestricted at<br class="">/Users/goev/esp/esp-idf/components/freertos/./tasks.c:4446<br class=""><br class="">0x400860f1: vQueueWaitForMessageRestricted at<br class="">/Users/goev/esp/esp-idf/components/freertos/./queue.c:2392<br class=""><br class="">0x4008771b: prvProcessTimerOrBlockTask at<br class="">/Users/goev/esp/esp-idf/components/freertos/./timers.c:839<br class=""><br class="">0x40087818: prvTimerTask at<br class="">/Users/goev/esp/esp-idf/components/freertos/./timers.c:839<br class=""><br class="">It looks like it has something to do with the Signal event, but I ‘m<br class="">still not that good using gbd to find out what actually makes this fail.<br class="">Any one got a clue?<br class=""><br class="">Regards,<br class="">Geir<br class=""><br class=""><br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></blockquote><br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""><br class=""></blockquote><br class=""><br class="">_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">OvmsDev mailing list<br class=""><a href="mailto:OvmsDev@lists.teslaclub.hk" class="">OvmsDev@lists.teslaclub.hk</a><br class="">http://lists.teslaclub.hk/mailman/listinfo/ovmsdev<br class=""></div></blockquote></div><br class=""></div></div></body></html>