-
@danielson524
If you know their name you can at "@" them.
What are you looking to do just curious?
Do these old visualizers still work under windows 11 anway? -
-
So i have a pine time and a nRF528340 dev board that i'm working with currently. I can seem to debug the nRF528340DK perfectly. But the pinetime just seems to not want to work from the start. From the the two build one thing that stand out to me is this line at the end. This overlap=replace doesn't seem to need to be set in the normal devboard.
FIXME - had to set --overlap=replace
python scripts/hexmerge.py --overlap=replace targetlibs/nrf5x_12/components/softdevice/s132/hex/s132_nrf52_3.1.0_softdevice.hex bin/bootloader_espruino_2v19_p8_SDK12_SD30_SPIFLASH.hex bin/espruino_2v19_p8_SDK12_SD30_SPIFLASH.app_hex obj/dfu_settings.hex -o bin/espruino_2v19_p8_SDK12_SD30_SPIFLASH.hex -
I still have to actually understand more about this. But the registers look wrong from the start?
Start address 0x1f7bc, load size 281236 Transfer rate: 20 KB/sec, 13392 bytes/write. (gdb) ls Undefined command: "ls". Try "help". (gdb) info registers r0 0x0 0 r1 0x0 0 r2 0x0 0 r3 0x0 0 r4 0x0 0 r5 0x0 0 r6 0x0 0 r7 0x0 0 r8 0x0 0 r9 0x0 0 r10 0x0 0 r11 0x0 0 r12 0x0 0 sp 0xffffffd8 0xffffffd8 lr 0xfffffff9 -7 pc 0x1f7bc 0x1f7bc <Reset_Handler> xPSR 0x1000003 16777219 fpscr 0x0 0 msp 0xfffffffc 0xfffffffc psp 0x0 0x0 primask 0x0 0 basepri 0x0 0 faultmask 0x0 0 control 0x0 0
-
[Solution] is on #18 - but i'll keep these note for future reference.
Right now i'm trying to figure out why the program completely crashes when i first run it? This is what happens when i try to debug my Pinetime. When i do my first step it just crashes. When i don't debug it, it the build works just fine?
(gdb) load Loading section .text, size 0x449dc lma 0x1f000 Loading section .ARM.exidx, size 0x8 lma 0x639dc Loading section .data, size 0xa0 lma 0x639e4 Loading section .fs_data, size 0x10 lma 0x63a84 Start address 0x1f7bc, load size 281236 Transfer rate: 20 KB/sec, 13392 bytes/write. (gdb) step Single stepping until exit from function Reset_Handler, which has no line number information. Note: automatically using hardware breakpoints for read-only addresses. SystemInit () at targetlibs/nrf5x_12/components/toolchain/system_nrf52.c:67 67 if (errata_16()){
-
@Gordon @fanoush - Thanks for clearing this up for me.
I think i was getting confused because i see this when i start up GDB.
"No symbol table is loaded. Use the "file" command."Which i'm guessing is because when you first load up gdb it doesn't load the file. Its currently commented out for some reason.
-
Progress being made.
helpful links
debugging nordic chips
gdb commandsSo after your running gdb is connect to your server you need to
- load
Which flashes the code onto the device. From there you can do your next and continue commands.
You can also edit your ~/.gdbinit file so you don't have to hit enter every time.
next problem
So i have testing the above stuff on a nRF52840DK which has lots of flash. But the current micro is a nRF52832 with barely any. So my plan was to add the debug symbols to just the specific files i care about. So this compiles but doesn't seem to add any size to the code base. So thats the next thing to figure out.
trying to add special debug symbols
$(OBJDIR)/libs/banglejs/jswrap_bangle.o: libs/banglejs/jswrap_bangle.c @echo " $($(quiet_)compile) " @mkdir -p $(shell dirname $@) # create directory if it doesn't exist @$(CC) $(CFLAGS) $< -g -o $@
- load
-
Just for people new to this.
First start your server
- JLinkGDBServer/Openocd
If its working you should see something like Waiting for GDB connection
Then do your
- make ...... gdb
Then gdb will get ready to be started and then you just hit enter to start it or q to quite.
This should build your program and then run the arm gdb client.
If there's problems with with GDB for some reason the client side.
You can look at make/targets/arm.make. There's a make file that has the commands for GDB. Basically it makes a file and then tells gdb to execute it. - JLinkGDBServer/Openocd
-
-
So it was a fairly easy fix to stop the CORS problem.
var express = require('express'); const cors = require('cors'); var app = express(); app.use(cors());
If i understand this properly this app.js is just testing. So if that's the case. I can push this simple fix and redirect anything that's trying to load a file from localhost:3040/modules to ~/workspace/espruinowebsite/www/modules
-
Sorry my bad! When you suggested look at the web ide. I thought you were talking about on the actual web page. So module.html.. I saved the espruino app to my desktop, so i forget it's actually a web page.
So yes the problem is that in chrome it doesn't accept none secure local host files. The specific problem.
Access to fetch at 'http://localhost:3040/modules/BH1792.min.js' from
origin 'https://www.espruino.com' has been blocked by CORS policy: No
'Access-Control-Allow-Origin' header is present on the requested
resource. If an opaque response serves your needs, set the request's
mode to 'no-cors' to fetch the resource with CORS disabled. -
So this is my current understanding
app.js is the way the websites served. It serves the content inside EspruinoDocs/html. This file includes all the files that got generated from the markdown modules.
Now the the javascript modules are in. So they they never get served up from the server.
[#buildmodules](https://forum.espruino.com/search/?q=%23buildmodules).sh DIR=`pwd` WEBSITE="$HOME/workspace/espruinowebsite" MODULEDIR=$WEBSITE/www/modules
So i changed the location
DIR=`pwd` WEBSITE="$DIR/html" MODULEDIR=$WEBSITE/modules
and now the ide will grab the files it just doesn't use it?
So i can see from the server it serves the files.
//terminal from app start
returning: /modules/BH1792.min.js
returning: /modules/BH1792.jsbut from the ide perspective i still get.
"Module BH1792 not found" -
So i think the problem i'm having is this.
On the web folder explorer i can see this gives me a list of js filesBut when i do http://localhost:3040/modules - i get
- Cannot GET /modules
As for the debug console. I don't see any errors.
It loads- modules name html
- offline.css
- and a refimage
- Cannot GET /modules
-
Thanks for the constantly good advice @fanoush!
I'll give it a go and post my results.
-
I'm not a expert, but my first question would be can the Pico uart driver even go that slow? I know hardware drivers have to do clock dividers to get to a certain frequency and that might be lower then the ranges it can work in.
But you could try and take a jumper from your Pico TX uart lines and connect it to your RX lines. Thus created a loop in your communication. It should be a quick test to see if the device can actually produce and receive that range. If it can't i would hook up a oscilloscope and see the timing. It might be slightly off.
-
-
-
-
-
I did see this. https://www.espruino.com/AdvancedDebug
-
-
A flip() send a complete buffer over. I don't have code to send over a partial buffer over to the display at the moment.
A partial refresh is when you don't go through the entire process to change the pixels.
What does a change look like when nothing has changed? So if you run flip it will currently just flash the entire screen again. So if your on full refresh. Then it will blink a lot. If your on partial refresh. Then it will do nothing in terms of visible changes. But that's not good for the display.
So i made a video about what i've learned playing around with these displays. Not the best because i just wanted to get it done before the holidays. https://www.youtube.com/watch?v=MSgwCyRCyIk
-
So i have a module that i've made.
I've tested it locally by saving it to a file on the device i'm working on and it works fine. I've also pulled the EspruinoDocs and compiled it to make sure that the documentation looks fine.Now can i do one final test where i load it from my local EpsruinoDocs instance.
I run npm run start after doing a build.sh and i can see my webpage of my new module. But i can't seem to see it in the browser or from the device.
I set the module loading location to http://localhost:3040/devices
Any thoughts
So now i think i'm at this step.
When i'm stepping through the program from the very start.
In targets/nrf5x/jshardware.c - once i hit jsble_init() the software crashes. It seems to happen both my NRF52840 dev board and my pinetime. Just in different spots.
I just don't know were to stick this NRF.sleep() call?