More info here if you want to see how regions are structured at a high level of detail: https://youtu.be/AyOAjFNPAbA?t=15m21s
More info here if you want to see how regions are structured at a high level of detail: https://youtu.be/AyOAjFNPAbA?t=15m21s
I've only used the Arduino Mini/Micro so far (with Atmega328 or Atmega32u4). Is it possible to debug on those?
I used the J-Link but I wanted to do it on Linux, so I used the JLink GDB Server along with the GDB build that comes with the Arduino IDE. It probably takes me a good 5 minutes to get everything set up, but the basic stuff works: breakpoints, stack trace, reading and writing memory locations.
The setup is a little convoluted, I'm not sure if there is a better way, but here are my notes:
Procedure for running w/ debugger attached.
1. disconnect debugger's usb
2. connect device via usb
3. arduino IDE program device
4. identify elf, set up gdb with elf.
5. plug in debugger
6. run jlink gdb server
7. attach gdb to jlink server "target remote:2331"
8. "monitor reset", "continue" to re-run target from beginning.
9. observe device is recognized by Arduino IDE
10. open Arduino IDE serial monitor to interact with device.
Now, Ctrl+C in GDB halts device, and stack etc. can be inspected, and
then it can continue running with "cont".
To rerun the device with the same program without redoing everything,
go to step 8 and reset the device. and continue from there.
To find .elf on linux:
==================================================
find /tmp -name sketch_name.ino.elf 2>/dev/null
gdb location:
==================================================
/home/user/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gdb
JLink setup command:
==================================================
JLinkGDBServer -device ATSAMD21G18A -if SWD -speed 4000
gdb attachment:
==================================================
(gdb) target remote:2331Now I'm sure that kernel-level stuff wasn't designed like this, and probably won't be for some time (I'm hoping Rust changes that story, but not a low-level coder), so debuggers may still be necessary- just making a point that it seems possible to design in such a way that the need for one is drastically reduced, if not eliminated. Or at least, that's how it seems to me in high-level-language-land (things may differ at the assembly and C levels).
EDIT: I apologize for OT, probably not the ideal place to start a "are debuggers really necessary if you design code correctly?" discussion, after all this is part 3 of a series, my bad
For example, if I'm working on a Python script under 1000 lines I would never use a debugger. I might use wireshark or linux system tools if something was really wrong, but usually the trackback or program output is sufficient.
I've also tried to debug an Arduino project where I had a lot less knowledge of how the system works, and if I wasn't able to attach a debugger I don't want to know how long it would have taken me to find the problem (calling a null function pointer causes an interrupt that didn't have any handler).
I've also tried to debug other people's projects in high level languages, without a debugger where after taking about an hour to figure it out based on pure reason, realizing it would have been very quick and easy to find with a debugger.
I think if you look at what a program is doing, and at that point you can't form a testable hypothesis as to what is happening, at that point a debugger will certainly be faster if you know how to use it.
And that's why the government assistance in the form of launch aide might have been worth it.
Instead of energy consuming work, you could have a cryptographic lottery.
I think DAG coins could be a lot more efficient, but I'm not totally solid intellectually on how they achieve consensus on conflicting spends so I'm not sure it will work as a general solution. The only one I've used, nano, has I believe no mining reward, and I think consensus is achieved based on a voting process weighted by proof-of-stake among online nodes -- the incentive for participating in the system is that the system has value for you in other ways. I'm not closely following ETH PoS research, but it will be interesting to see what they can accomplish, it could create a huge reduction in energy consumption.
If you're referring to financial markets, I personally learned a lot from Trading and Exchanges: Market Microstructure for Practitioners, although I didn't finish it. But it explains the basic characteristics of financial markets, and why they are set up the way they are. It isn't necessarily going to be obvious and financial markets are based on hundreds of years of accumulated knowledge.
Can't find any reference to WKS as a 'field' or record type. Any greybeards want to elaborate?