SparkFun Forums 

Where electronics enthusiasts find answers.

What are we doing right with Artemis? What are we doing wrong? Let us know here!
#209905
liquid.soulder wrote: Thu Oct 31, 2019 12:29 pm
FWIW my launch.json file looks like this:
Code: Select all
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "cortex-debug",
            "request": "launch",
            "name": "Cortex Debug",
            "cwd": "${workspaceRoot}",
            "executable": "${workspaceRoot}/BUILD/EDGE2/GCC_ARM/mbed-os-example-blinky-baremetal.elf",
            "serverpath": "C:/Program Files (x86)/SEGGER/JLink_V642/JLinkGDBServerCL.exe", 
            "servertype": "jlink",
            "device": "AMA3B1KK-KBR",
            "interface": "swd",
            "serialNumber": "", //if you have more than one J-Link probe add the serial number here 
            // "jlinkscript":"${workspaceRoot}/BSP/SEGGER/K66FN2M0_emPower/Setup/Kinetis_K66_Target.js",
            "runToMain": true,
            "svdFile": "C:/Users/user/AmbiqMicro.Apollo_DFP.1.1.0/SVD/apollo3.svd",
        }
    ]
}
You can get the Device Family Pack for the Apollo3 (which contains the SVD file) here:
https://www.keil.com/dd2/pack/#third-pa ... oad-dialog
Can you give more details on getting the SVD file? I downloaded the link you provided, but it is a ".pack" file. I'm not familiar with that format and how to use it. Thanks.
#209908
Can you give more details on getting the SVD file? I downloaded the link you provided, but it is a ".pack" file. I'm not familiar with that format and how to use it. Thanks.
There is an easier way: the Ambiq Suite release itself contains the Apollo3 SVD file. The file is located inside the Ambiq Suite hierarchy here: <...>\AmbiqSuite-Rel2.2.0\pack\SVD\apollo3.svd
#209915
Sure thing. It was actually much easier. If you go into the VS Code extensions manager and search for "cortex", you should see a plugin called "Cortex-Debug" by marus25. Install it. Then, configure your launch.json file as noted above with your personal customizations. You'll need the ELF file compiled/linked (all objects, too) with the "-g" flag. Start the debugger from VS Code. The server should start and connect to your target. You can set "runToMain" true/false in the JSON file. I did have a few hiccups because I hadn't set paths correctly. Once I got that corrected and added the SVD path you provided (thanks again), all seems to be working. I've got source, vars, watch, call stack, BP's, Cortex Periphs/Regs. I'm stepping, running, etc. I've also got my printf's going to my terminal app. It's very, very handy. I made a lot of progress today. The great thing is that I don't have to worry about the cost of SES or another product. And, I can use this for any potential commercial stuff. Let me know how it goes. I don't think I left out anything major.
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]