{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7081","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7081/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7081/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7081/events","html_url":"https://github.com/RIOT-OS/RIOT/issues/7081","id":229757766,"number":7081,"title":"bootloader and application section","user":{"login":"photonthunder","id":7527973,"avatar_url":"https://avatars3.githubusercontent.com/u/7527973?v=3","gravatar_id":"","url":"https://api.github.com/users/photonthunder","html_url":"https://github.com/photonthunder","followers_url":"https://api.github.com/users/photonthunder/followers","following_url":"https://api.github.com/users/photonthunder/following{/other_user}","gists_url":"https://api.github.com/users/photonthunder/gists{/gist_id}","starred_url":"https://api.github.com/users/photonthunder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/photonthunder/subscriptions","organizations_url":"https://api.github.com/users/photonthunder/orgs","repos_url":"https://api.github.com/users/photonthunder/repos","events_url":"https://api.github.com/users/photonthunder/events{/privacy}","received_events_url":"https://api.github.com/users/photonthunder/received_events","type":"User","site_admin":false},"labels":[{"id":76555437,"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/arm","name":"arm","color":"dddddd","default":false},{"id":23399102,"url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":{"login":"kYc0o","id":5419775,"avatar_url":"https://avatars2.githubusercontent.com/u/5419775?v=3","gravatar_id":"","url":"https://api.github.com/users/kYc0o","html_url":"https://github.com/kYc0o","followers_url":"https://api.github.com/users/kYc0o/followers","following_url":"https://api.github.com/users/kYc0o/following{/other_user}","gists_url":"https://api.github.com/users/kYc0o/gists{/gist_id}","starred_url":"https://api.github.com/users/kYc0o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kYc0o/subscriptions","organizations_url":"https://api.github.com/users/kYc0o/orgs","repos_url":"https://api.github.com/users/kYc0o/repos","events_url":"https://api.github.com/users/kYc0o/events{/privacy}","received_events_url":"https://api.github.com/users/kYc0o/received_events","type":"User","site_admin":false},"assignees":[{"login":"kYc0o","id":5419775,"avatar_url":"https://avatars2.githubusercontent.com/u/5419775?v=3","gravatar_id":"","url":"https://api.github.com/users/kYc0o","html_url":"https://github.com/kYc0o","followers_url":"https://api.github.com/users/kYc0o/followers","following_url":"https://api.github.com/users/kYc0o/following{/other_user}","gists_url":"https://api.github.com/users/kYc0o/gists{/gist_id}","starred_url":"https://api.github.com/users/kYc0o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kYc0o/subscriptions","organizations_url":"https://api.github.com/users/kYc0o/orgs","repos_url":"https://api.github.com/users/kYc0o/repos","events_url":"https://api.github.com/users/kYc0o/events{/privacy}","received_events_url":"https://api.github.com/users/kYc0o/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/19","html_url":"https://github.com/RIOT-OS/RIOT/milestone/19","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/milestones/19/labels","id":2471521,"number":19,"title":"Release 2017.07","description":"","creator":{"login":"kaspar030","id":4679640,"avatar_url":"https://avatars3.githubusercontent.com/u/4679640?v=3","gravatar_id":"","url":"https://api.github.com/users/kaspar030","html_url":"https://github.com/kaspar030","followers_url":"https://api.github.com/users/kaspar030/followers","following_url":"https://api.github.com/users/kaspar030/following{/other_user}","gists_url":"https://api.github.com/users/kaspar030/gists{/gist_id}","starred_url":"https://api.github.com/users/kaspar030/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaspar030/subscriptions","organizations_url":"https://api.github.com/users/kaspar030/orgs","repos_url":"https://api.github.com/users/kaspar030/repos","events_url":"https://api.github.com/users/kaspar030/events{/privacy}","received_events_url":"https://api.github.com/users/kaspar030/received_events","type":"User","site_admin":false},"open_issues":115,"closed_issues":57,"state":"open","created_at":"2017-04-21T08:04:23Z","updated_at":"2017-05-22T13:16:50Z","due_on":"2017-07-31T07:00:00Z","closed_at":null},"comments":3,"created_at":"2017-05-18T18:03:33Z","updated_at":"2017-05-22T17:04:33Z","closed_at":null,"body":"I want to setup a bootloader for my samd21 board.  I have a simple test program for the boot section that just tries to jump to application section (I have set the application section at 0x4000).\r\n\r\nIn the Makefile.include I added the following for the application memory:\r\n\r\nexport LINKFLAGS += -Wl,--section-start=.text=0x4000\r\n\r\nAfter programming both to the board I get the following error:\r\n\r\nStack pointer corrupted, rest to top of stack\r\nMisc\r\nEXC_RET: 0xfffffffd\r\n\r\nI have read the jump memory location and it does have the correct hex data from the application so I \"think\" that is working.  Is there something I am missing from my link flag?"},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/303160622","html_url":"https://github.com/RIOT-OS/RIOT/issues/7081#issuecomment-303160622","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/7081","id":303160622,"user":{"login":"photonthunder","id":7527973,"avatar_url":"https://avatars3.githubusercontent.com/u/7527973?v=3","gravatar_id":"","url":"https://api.github.com/users/photonthunder","html_url":"https://github.com/photonthunder","followers_url":"https://api.github.com/users/photonthunder/followers","following_url":"https://api.github.com/users/photonthunder/following{/other_user}","gists_url":"https://api.github.com/users/photonthunder/gists{/gist_id}","starred_url":"https://api.github.com/users/photonthunder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/photonthunder/subscriptions","organizations_url":"https://api.github.com/users/photonthunder/orgs","repos_url":"https://api.github.com/users/photonthunder/repos","events_url":"https://api.github.com/users/photonthunder/events{/privacy}","received_events_url":"https://api.github.com/users/photonthunder/received_events","type":"User","site_admin":false},"created_at":"2017-05-22T17:04:33Z","updated_at":"2017-05-22T17:04:33Z","body":"At this point all I was trying to do was to get it to jump in memory (no actual bootloader code yet).  I will implement an extremely simple bootloader and when i do I will share it.  For now here is the code I am using for my jump (simplified from ASF):\r\n\r\n`\r\n#include \"samd21Misc.h\"\r\n#include \"globals.h\"\r\n\r\n#define APP_START_ADDRESS          0x00004000\r\n\r\nstatic void jumpToApplication(void);\r\n\r\nint main(void)\r\n{\r\n\r\n\tjumpToApplication();\r\n\twhile (1) {\r\n\t}\r\n}\r\n\r\n\r\nstatic void jumpToApplication(void)\r\n{\r\n\tuint32_t app_check_address;\r\n\tuint32_t *app_check_address_ptr;\r\n\t\r\n\tapp_check_address = APP_START_ADDRESS;\r\n\tapp_check_address_ptr = (uint32_t *) app_check_address;\r\n\t\r\n\tif (*app_check_address_ptr == 0xFFFFFFFF) {\r\n\t\t//printf(\"Application section empty\\n\");\r\n\t\twhile (1) {\r\n\t\t}\r\n\t}\r\n\t//printf(\"Application=0x%08lX\\n\", *app_check_address_ptr);\r\n\r\n\t/* Pointer to the Application Section */\r\n\tvoid (*application_code_entry)(void);\r\n\t\r\n\t/* Rebase the Stack Pointer */\r\n\t__set_MSP(*(uint32_t *) APP_START_ADDRESS);\r\n\t\r\n\t/* Rebase the vector table base address */\r\n\tSCB->VTOR = ((uint32_t) APP_START_ADDRESS & SCB_VTOR_TBLOFF_Msk);\r\n\t\r\n\t/* Load the Reset Handler address of the application */\r\n\tapplication_code_entry = (void (*)(void))(unsigned *)(*(unsigned *)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t  (APP_START_ADDRESS + 4));\r\n\t\r\n\t/* Jump to user Reset Handler in the application */\r\n\tapplication_code_entry();\r\n}\r\n`"}}
{"actor":{"display_login":"photonthunder"}}