<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="Signature"><br>
Mark, Micheal,</div>
<div id="Signature"><br>
</div>
<div id="Signature">Thanks for both your responses.</div>
<div id="Signature"><br>
</div>
<div id="Signature">I was not using the "-j4" and i had the virus scanner going berserk in the back ground. I am now getting times that are in the ball park.</div>
<div id="Signature"><br>
</div>
<div id="Signature">I looked at Fabrizio's thread. I very much applaud his efforts. I am not yet in a state where i can start porting code yet. Still trying to understand everything thats going on in the modules.</div>
<div id="Signature"><br>
</div>
<div id="Signature"><br>
</div>
<div id="Signature">Here is what i am trying to do:</div>
<div id="Signature">I want to re-purpose the project for use in a high-end ebike. </div>
<div id="Signature">The major changes that i am exploring are:</div>
<div id="Signature">
<ul>
<li>Add 1 or 2 serial interfaces. </li><li>Add a display/ dashboard /odometer to the system. This means there will be another data consumer. (thinking of equipping a display with can functionality)</li><li>In order to work around the lack of io pins on the esp32, i was thinking to replace the 2 MP2515's, the MAX7317 by a sinlge STM32F1xx chip (or higher level model) . Inside the STM i can implement dual CAn, dual UART and use the rest of the pins as GPIO.
 Interfacing between the esp32 and the stm will still go though the SPI. If I implement the same register structures as the dedicated IC's in the STM code, the software changes should be oversee-able. </li><li>There are 3 concerns that i have:</li><ul>
<li>The latency of handling the CAN busses is probably going to increase. Hard to say by how much at this stage. It might be minimal. The STM has dedicated CAN protocol functionality like the MP2515's. Its the glue code that bridges between SPI and CAN that
 i am worried about.</li><li>Congestion of the SPI bus: In the scenario where one of the CAN busses has a display  on it and one of the UARTs is connected to a BMS or MotorController. There will be major data flows in 2 directions on the SPI.</li><li>Even if i keep the code in the STM as dumb and transparent as possible, there still is the need to update it in the field. This means i need 1-2 more sections in the ESP flash for OTA -ing the stm plus the software functionality to perform an OTA of the
 STM from the ESP.<br>
 </li></ul>
</ul>
<div> What are you guys' thoughts about this. Is this feasible or am i crazy <span id="🙂">
🙂? </span></div>
<div><span><br>
</span></div>
<div><span>Thanks,</span></div>
<div><span>Eddy</span></div>
</div>
<div id="Signature"> <br>
</div>
<div id="Signature"><br>
</div>
<div id="Signature"><br>
</div>
<div id="Signature"><br>
<br>
</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> OvmsDev <ovmsdev-bounces@lists.openvehicles.com> on behalf of Michael Balzer <dexter@expeedo.de><br>
<b>Sent:</b> Wednesday, April 8, 2020 2:01 PM<br>
<b>To:</b> ovmsdev@lists.openvehicles.com <ovmsdev@lists.openvehicles.com><br>
<b>Subject:</b> Re: [Ovmsdev] Flash memory and developement setup</font>
<div> </div>
</div>
<div>Eddy,<br>
<br>
note that Fabrizio works on porting the OVMS to ESP-IDF 4:<br>
<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fopenvehicles%2FOpen-Vehicle-Monitoring-System-3%2Fissues%2F263%23issuecomment-606132473&data=02%7C01%7C%7C5c4463d3fd1d494f5a0108d7db826bfa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637219225514996313&sdata=Q4b2akvAkXaPoRU7Dx4unjOLqw83qsV6IeIOB5ZvPHg%3D&reserved=0" originalsrc="https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/263#issuecomment-606132473" shash="jCINyPtnHvHoclO7uZzsfUOQn4zIgN5WqYa4TQo95l5xa6WgZivT8AZZWOwvQr4m7CbtTc2WJdXHPVvUI4ceGFmP8k87gvDgSv6KNjuMiobijKLhW7xdDDXgvBA00Jq9iHkt00EZdZB4zYXzTaM3F3HwlWlEngLzqY9jGPv3sU4=">https://github.com/openvehicles/Open-Vehicle-Monitoring-System-3/issues/263#issuecomment-606132473</a><br>
<br>
Maybe you can join forces?<br>
<br>
Regards,<br>
Michael<br>
<br>
<br>
<div class="x_moz-cite-prefix">Am 08.04.20 um 04:05 schrieb Mark Webb-Johnson:<br>
</div>
<blockquote type="cite">
<div class=""><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div id="x_Signature" class="">Am I correct to assume that the 16Mb of memory is on the  module now?</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
The ESP32 chip uses an external flash chip. The WROOM/WROVER modules include a flash chip in the modules.
<div class=""><br class="">
</div>
<div class="">In the very early days of development prototypes for OVMS v3, we used an external 16MB flash chip (as only 4MB WROOM modules were available at the time).</div>
<div class=""><br class="">
</div>
<div class=""><font class="" color="#000000"><span class="" style="">For production, we switched to 16MB WROVER modules, so don’t require any external flash chip any more.</span></font></div>
<div class=""><font class="" color="#000000"><span class="" style=""><br class="">
</span></font></div>
<div class="">
<blockquote type="cite" class="">
<div class="">
<div id="x_Signature" class="">How are the core developers dealing with this slowness?</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
I don’t find it slow at all (but I use MAC and LINUX for development). Most of the time, it is an incremental build (only building changes code, and then a linking step) - it normally takes longer to flash the chip than build the code. I timed a full â€˜make
 clean; make -j 4’ to see what it is for me:</div>
<div class=""><br class="">
</div>
<blockquote class="" style="margin:0 0 0 40px; border:none; padding:0px">
<div class="">$ time make -j 4</div>
<div class="">...</div>
<div class="">
<div class="">real<span class="x_Apple-tab-span" style="white-space:pre"> </span>
2m53.557s</div>
<div class="">user<span class="x_Apple-tab-span" style="white-space:pre"> </span>
5m55.978s</div>
<div class="">sys<span class="x_Apple-tab-span" style="white-space:pre"> </span>1m40.391s</div>
</div>
</blockquote>
<div class="">
<div><br class="">
</div>
<div>Just under 3 minutes real time. Perhaps you can check in windows to see how much worse it is?</div>
<div><br class="">
</div>
<div>
<blockquote type="cite" class="">
<div class="">
<div id="x_Signature" class="">Is it at all possible, if i could force platformio to use the correct the idf-esp libraries, to compile the OVMS code in a  more recent environment that uses cmake and ninja?</div>
</div>
</blockquote>
</div>
<div><br class="">
</div>
<div>I haven’t tried it myself. We do have some make scripts in various components that may rely on the existing build system. Things like the versioning.</div>
<div><br class="">
</div>
<div>OVMS was written when ESP-IDF was quite new, and unpolished. At some point, we will most likely migrate to a newer build system, as ESP-IDF matures.</div>
<div><br class="">
</div>
<div>Regards, Mark.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 8 Apr 2020, at 8:37 AM, Eddy Vromen <<a href="mailto:eddy_vromen@hotmail.com" class="">eddy_vromen@hotmail.com</a>> wrote:</div>
<br class="x_Apple-interchange-newline">
<div class="">
<div class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<div class="" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt"><br class="x_Apple-interchange-newline">
<br class="">
</div>
<div id="x_Signature" class=""><br class="">
HI All,</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class="">I have a question about the flash memory of the ESP32.</div>
<div id="x_Signature" class="">I read that the ESP32 uses 16Mb of external flash memory and in the schematics on page 27 there is a flash memory chip. However, in the latest v3.2 schematics there is no external flash chip.</div>
<div id="x_Signature" class="">Am I correct to assume that the 16Mb of memory is on the  module now?</div>
<div id="x_Signature" class="">How does this impact the e-fuse settings?</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class="">Another question that came up while setting up a development environment:</div>
<div id="x_Signature" class="">The version of esp-idf thats used by the OVSM project uses the Mingw32  environment. Based on my limited exposure to using this environment, its very slow compared to compiling esp-idf code under e.g. platformio under VSCode. </div>
<div id="x_Signature" class="">How are the core developers dealing with this slowness?</div>
<div id="x_Signature" class="">Is it at all possible, if i could force platformio to use the correct the idf-esp libraries, to compile the OVMS code in a  more recent environment that uses cmake and ninja?</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class=""><br class="">
</div>
<div id="x_Signature" class="">Thanks,</div>
<div id="x_Signature" class="">Eddy<br class="">
<br class="">
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<span class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; float:none; display:inline!important">OvmsDev
 mailing list</span><br class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="mailto:OvmsDev@lists.openvehicles.com" class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">OvmsDev@lists.openvehicles.com</a><br class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none">
<a href="https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.openvehicles.com%2Fmailman%2Flistinfo%2Fovmsdev&data=02%7C01%7C%7C5c4463d3fd1d494f5a0108d7db826bfa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637219225515006310&sdata=QI16eSBZDXwCztdm0Xva6%2Bl%2BtFEOXMIyzjfItgvmlUc%3D&reserved=0" originalsrc="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" shash="GaNLLUNJubw424addmg7BqdaLQXY5JTSV7OMZ53rCnn1sCFvIY+Jn2qtRfDrE4rdpqj8Yh6JPEmexcBD5375G5WtFqdD9fGTtOYfdmv5WzNZiOzPI3kMMMGPHu/DmiewF++3BlLElk/InOb9N54NO53CuuUAVBkkO+K3F5Fnhr4=" class="" style="font-family:Helvetica; font-size:18px; font-style:normal; font-variant-caps:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a></div>
</blockquote>
</div>
<br class="">
</div>
<br>
<fieldset class="x_mimeAttachmentHeader"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
OvmsDev mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:OvmsDev@lists.openvehicles.com">OvmsDev@lists.openvehicles.com</a>
<a class="x_moz-txt-link-freetext" href="https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.openvehicles.com%2Fmailman%2Flistinfo%2Fovmsdev&data=02%7C01%7C%7C5c4463d3fd1d494f5a0108d7db826bfa%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637219225515006310&sdata=QI16eSBZDXwCztdm0Xva6%2Bl%2BtFEOXMIyzjfItgvmlUc%3D&reserved=0" originalsrc="http://lists.openvehicles.com/mailman/listinfo/ovmsdev" shash="GaNLLUNJubw424addmg7BqdaLQXY5JTSV7OMZ53rCnn1sCFvIY+Jn2qtRfDrE4rdpqj8Yh6JPEmexcBD5375G5WtFqdD9fGTtOYfdmv5WzNZiOzPI3kMMMGPHu/DmiewF++3BlLElk/InOb9N54NO53CuuUAVBkkO+K3F5Fnhr4=">http://lists.openvehicles.com/mailman/listinfo/ovmsdev</a>
</pre>
</blockquote>
<br>
<pre class="x_moz-signature" cols="160">-- 
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
</pre>
</div>
</body>
</html>