doc about accessing a private repo
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/b4077d02 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/b4077d02 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/b4077d02 Branch: refs/heads/asf-site Commit: b4077d0227cf34e9eaa576cdba5acf24803f927e Parents: 35f2fc7 Author: aditihilbert <ad...@runtime.io> Authored: Mon Feb 13 17:01:59 2017 -0800 Committer: aditihilbert <ad...@runtime.io> Committed: Mon Feb 13 17:01:59 2017 -0800 ---------------------------------------------------------------------- develop/mkdocs/search_index.json | 10 + develop/os/tutorials/repo/add_repos/index.html | 8 + .../os/tutorials/repo/create_repo/index.html | 12 +- .../os/tutorials/repo/private_repo/index.html | 585 +++++++++++++++++++ .../os/tutorials/repo/upgrade_repo/index.html | 8 + develop/os/tutorials/tasks_lesson/index.html | 4 +- develop/sitemap.xml | 24 +- latest/mkdocs/search_index.json | 10 + latest/os/tutorials/repo/add_repos/index.html | 8 + latest/os/tutorials/repo/create_repo/index.html | 12 +- .../os/tutorials/repo/private_repo/index.html | 585 +++++++++++++++++++ .../os/tutorials/repo/upgrade_repo/index.html | 8 + latest/os/tutorials/tasks_lesson/index.html | 4 +- latest/sitemap.xml | 24 +- sitemap.xml | 26 +- v0_9_0/sitemap.xml | 26 +- 16 files changed, 1296 insertions(+), 58 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/mkdocs/search_index.json ---------------------------------------------------------------------- diff --git a/develop/mkdocs/search_index.json b/develop/mkdocs/search_index.json index 779e2f4..057a2c2 100644 --- a/develop/mkdocs/search_index.json +++ b/develop/mkdocs/search_index.json @@ -1046,6 +1046,16 @@ "title": "Resolving dependencies" }, { + "location": "/os/tutorials/repo/private_repo/", + "text": "Accessing a private repository\n\n\nTo access a private repository, newt needs to be configured with one of the following:\n\n\n\n\nAccess token for the repository\n\n\nBasic auth login and password for the user\n\n\n\n\nNOTE:\n To create a github access token, see \n\nhttps://help.github.com/articles/creating-an-access-token-for-command-line-use/\n\n\nThere are two ways to specify this information, as shown below. In\nthese examples, both a token and a login/password are specified, but you\nonly need to specify one of these.\n\n\n1. project.yml (probably world-readable and therefore not secure):\n\n\n repository.my-private-repo:\n type: github\n vers: 0-dev\n user: owner-of-repo\n repo: repo-name\n\n token: \n8ab6433f8971b05c2a9c3341533e8ddb754e404e\n\n\n login: githublogin\n\n password: githubpassword\n\n\n\n\n\n2. $HOME/.newt/repos.yml\n\n\n repository.my-private-repo:\n\n token: \n8ab6433f8971b05 c2a9c3341533e8ddb754e404e\n\n\n login: githublogin\n\n password: githubpassword\n\n\n\n\n\nIf both a token and a login+password are specified, newt uses the token.\nIf both the project.yml file and the private repos.yml file specify\nsecurity credentials, newt uses the project.yml settings.\n\n\nNOTE:\n When newt downloads the actual repo content, as\nopposed to just the repository.yml file, it does not use the same\nmechanism. Instead, it invokes the git command line tool. This is an\nannoyance because the user cannot use the same access token for all git\noperations. This is something that will be fixed in the future.", + "title": "Access a private Repo" + }, + { + "location": "/os/tutorials/repo/private_repo/#accessing-a-private-repository", + "text": "To access a private repository, newt needs to be configured with one of the following: Access token for the repository Basic auth login and password for the user NOTE: To create a github access token, see \nhttps://help.github.com/articles/creating-an-access-token-for-command-line-use/ There are two ways to specify this information, as shown below. In\nthese examples, both a token and a login/password are specified, but you\nonly need to specify one of these. 1. project.yml (probably world-readable and therefore not secure): repository.my-private-repo:\n type: github\n vers: 0-dev\n user: owner-of-repo\n repo: repo-name token: 8ab6433f8971b05c2a9c3341533e8ddb754e404e login: githublogin password: githubpassword 2. $HOME/.newt/repos.yml repository.my-private-repo: token: 8ab6433f8971b05c2a9c3341533e8ddb754e404e login: githublogin password: githubpassword If both a token and a login+password are specified, newt uses the token.\nIf both the project.yml file and the private repos.yml file specify\nsecurity credentials, newt uses the project.yml settings. NOTE: When newt downloads the actual repo content, as\nopposed to just the repository.yml file, it does not use the same\nmechanism. Instead, it invokes the git command line tool. This is an\nannoyance because the user cannot use the same access token for all git\noperations. This is something that will be fixed in the future.", + "title": "Accessing a private repository" + }, + { "location": "/os/tutorials/tasks_lesson/", "text": "Core OS Lesson: Tasks and Priority Management\n\n\nTarget Platform: Arduino M0 Pro\n (or legacy Arduino Zero or Zero Pro, but not Arduino M0)\n\n\nThis lesson is designed to teach core OS concepts and strategies encountered when \nbuilding applications using Mynewt. Specifically, this lesson will cover tasks, \nsimple multitasking, and priority management running on an Arduino M0 Pro.\n\n\nPrerequisites\n\n\nBefore starting, you should read about Mynewt in the \nIntroduction\n \nsection and complete the \nQuickStart\n \nguide and the \nBlinky\n tutorial. \nFurthermore, it may be helpful to take a peek at the \ntask documentation\n \nfor additional insights.\n\n\nEquipment\n\n\nYou will need the following equipment:\n\n\n\n\nArduino M0 Pro (or legacy Arduino Zero or Zero Pro, but not Arduino M0)\n\n\nComputer with Mynewt installed\n\n\nUSB to Micro USB Cable\n\n\n\n\nBuild Your Application\n\n\nTo save time, we will simply modify the Blinky app. We'll add the Tas k Management code to\nthe Blinky app. Follow the \nArduino Zero Blinky tutorial\n \nto create a new project and build your bootloader and application. Finally, build and \nload the application to your Arduino to verify that everything is in order. Now let\u2019s get started!\n\n\nCreate a New Task\n\n\nThe purpose of this section is to give an introduction to the important aspects of tasks \nand how to properly initialize them. First, let\u2019s define a second task called \nwork_task\n \nin main.c (located in apps/blinky/src):\n\n\nstruct\n \nos_task\n \nwork_task\n;\n\n\n\n\n\nA task is represented by the \nos_task\n \nstruct which will hold the task\u2019s information (name, state, priority, etc.). A task is made up of two \nmain elements, a task function (also known as a task handler) and a task stack.\n\n\nNext, let\u2019s take a look at what is required to initialize our new task.\n\n\nTask Stack\n\n\nThe task stack is an array of type \nos_stack_t\n which holds the program st ack frames. Mynewt gives \nus the ability to set the stack size for a task giving the application developer room to optimize \nmemory usage. Since we\u2019re not short on memory, our \nblinky_stack\n and \nwork_stack\n are plenty large \nfor the purpose of this lesson. Notice that the elements in our task stack are of type \nos_stack_t\n \nwhich are generally 32 bits, making our entire stack 1024 Bytes.\n\n\n \n#define WORK_STACK_SIZE OS_STACK_ALIGN(256)\n\n\n\n\n\n\nNote: The \nOS_STACK_ALIGN\n macro is used to align the stack based on the hardware architecture.\n\n\nTask Function\n\n\nThe task function is essentially an infinite loop which waits for some \u201cevent\u201d to wake it up. In our \nBlinky app the task function, named \nblinky_task_handler()\n, is initially called when we call \nos_start()\n \nin \nmain()\n. In general, the task function is where the majority of work is done by a task. Let\u2019s write \na task function for \nwork_task\n called \nwork_task_handler()\ n:\n\n\nvoid\n\n\nwork_task_handler\n(\nvoid\n \n*arg\n)\n{\n \nstruct\n \nos_task\n \n*t\n;\n\n \ng_led_pin\n \n=\n \nLED_BLINK_PIN\n;\n \nhal_gpio_init_out\n(\ng_led_pin\n, \n1\n);\n\n \nwhile\n (\n1\n) {\n \nt\n \n=\n \nos_sched_get_current_task\n();\n \nassert\n(\nt-\nt_func\n \n==\n \nwork_task_handler\n);\n \n/* Do work... */\n\n }\n}\n\n\n\n\n\nThe task function is called when the task is initially put into the \nrunning\n state by the scheduler. \nWe use an infinite loop to ensure that the task function never returns. Our assertion that the current \ntask's handler is the same as our task handler is for illustration purposes only and does not need to \nbe in most task functions.\n\n\nTask Priority\n\n\nAs a preemptive, multitasking RTOS, Mynewt decides which tasks to run based on which has a higher \npriority; the highest priority being 0 and the lowest 255. Thus, before initializing our task, we \nmust choose a priority defined as a macro variable.\n\n\nLet\u2019s set the priority of \nwork_task\n to 0, because everyone knows that work is more important than blinking.\n\n\n \n#define WORK_TASK_PRIO (0)\n\n\n\n\n\n\nInitialization\n\n\nTo initialize a new task we use \nos_task_init()\n \nwhich takes a number of arguments including our new task function, stack, and priority. Much like \nblinky_task\n, \nwe\u2019re going to initialize \nwork_task\n inside \ninit_tasks\n to keep our main function clean. We'll set the task stack here and pass it to the \nos_task_init()\n function as well.\n\n\nint\n\n\ninit_tasks\n(\nvoid\n)\n{\n \n/* \u2026 */\n\n \nos_stack_t\n \n*work_stack\n;\n \nwork_stack\n \n=\n \nmalloc\n(\nsizeof\n(\nos_stack_t\n)\n*WORK_STACK_SIZE\n);\n\n \nassert\n(\npstack\n);\n \nos_task_init\n(\nwork_task\n, \nwork\n, \nwork_task_handler\n, \nNULL\n,\n \nWORK_TASK_PRIO\n, \nOS_WAIT_FOREVER\n, \nwork_stack\n,\n \nWORK_STACK_SIZE\n);\n\n \ntasks_initialized\n \n=\n \n1 \n;\n \nreturn\n \n0\n;\n}\n\n\n\n\n\nAnd that\u2019s it! Now run your application using the newt run command.\n\n\n$ newt run arduino_blinky 0.0.0\n\n\n\n\n\nWhen GDB appears press C then Enter to continue and \u2026 \nwait, why doesn't our LED blink anymore?\n\n\nReview\n\n\nBefore we run our new app, let\u2019s review what we need in order to create a task. This is a general case for a new task called mytask:\n\n\n1)\n Define a new task, task stack, and priority:\n\n\n/* My Task */\n\n\nstruct\n \nos_task\n \nmytask\n\n\n/* My Task Stack */\n\n\n#define MYTASK_STACK_SIZE OS_STACK_ALIGN(256)\n\n\nos_stack_t\n \nmytask_stack\n[\nMYTASK_STACK_SIZE\n];\n\n/* My Task Priority */\n\n\n#define MYTASK_PRIO (0)\n\n\n\n\n\n\n2)\n Define task function:\n\n\nvoid\n \n\nmytask_handler\n(\nvoid\n \n*arg\n)\n{\n \nwhile\n (\n1\n) {\n \n/* ... */\n\n }\n}\n\n\n\n\n\n3)\n Initialize task before calling \nos_start()\n:\n\n\nos_task_init\n(\nmytask\n, \nmytask\n, \nmytask_handler\n, \nN ULL\n, \n \nMYTASK_PRIO\n, \nOS_WAIT_FOREVER\n, \nmytask_stack\n,\n \nMYTASK_STACK_SIZE\n);\n\n\n\n\n\nTask Priority, Preempting, and Context Switching\n\n\nA preemptive RTOS is one in which a higher priority task that is \nready to run\n will preempt (i.e. take the \nplace of) the lower priority task which is \nrunning\n. When a lower priority task is preempted by a higher \npriority task, the lower priority task\u2019s context data (stack pointer, registers, etc.) is saved and the new \ntask is switched in.\n\n\nIn our example, \nwork_task\n has a higher priority than \nblinky_task\n and, because it is never put into a \n\nsleep\n state, holds the processor focus on its context. Let\u2019s give \nwork_task\n a delay and some simulated \nwork to keep it busy. Because the delay is measured in os ticks, the actual number of ticks per second is \ndependent on the board. Therefore, we multiply \nOS_TICKS_PER_SEC\n, which is defined in the MCU, by the \nnumber of s econds we wish to delay.\n\n\nvoid\n\n\nwork_task_handler\n(\nvoid\n \n*arg\n)\n{\n \nstruct\n \nos_task\n \n*t\n;\n\n \ng_led_pin\n \n=\n \nLED_BLINK_PIN\n;\n \nhal_gpio_init_out\n(\ng_led_pin\n, \n1\n);\n\n \nwhile\n (\n1\n) {\n \nt\n \n=\n \nos_sched_get_current_t\n:ask\n();\n \nassert\n(\nt-\nt_func\n \n==\n \nwork_task_handler\n);\n \n/* Do work... */\n\n \nint\n \ni\n;\n \nfor\n(\ni\n \n=\n \n0\n; \ni\n \n \n1000000\n; \n++i\n) {\n \n/* Simulate doing a noticeable amount of work */\n\n \nhal_gpio_set\n(\ng_led_pin\n);\n }\n \nos_time_delay\n(\n3\n*OS_TICKS_PER_SECOND\n);\n }\n}\n\n\n\n\n\nIn order to notice the LED changing, modify the time delay in \nblinky_task_handler()\n to blink at a higher frequency.\n\n\nos_time_delay\n(\nOS_TICKS_PER_SEC/\n10\n);\n\n\n\n\n\nBefore we run the app, let\u2019s predict the behavior. With the newest additions to \nwork_task_handler()\n, \nour first action will be to sleep for three seconds. This will allow \nblinky_task\n to take over the CPU \nand blink to its heart\u2019s content. After three seconds, \nwork_task\n will wake up and be made \nready to run\n, \ncausing it to preempt \nblinky_task\n. The LED will then remain lit for a short period while \nwork_task\n \nloops, then blink again for another three seconds while \nwork_task\n sleeps. \n\n\nVoila, you should see that our prediction was correct! \n\n\nPriority Management Considerations\n\n\nWhen projects grow in scope, from blinking LEDs into more sophisticated applications, the number of \ntasks needed increases alongside complexity. It remains important, then, that each of our tasks is \ncapable of doing its work within a reasonable amount of time.\n\n\nSome tasks, such as the Shell task, execute quickly and require almost instantaneous response. Therefore, \nthe Shell task should be given a high priority. On the other hand, tasks which may be communicating over \na networ k, or processing data, should be given a low priority in order to not hog the CPU.\n\n\nThe diagram below showcases the different scheduling patterns we. would expect from swapping blinky and \nwork tasks priorities.\n\n\n\n\nIn the second case where \nblinky_task\n has a higher priority, the \u201cwork\u201d done by \nwork_task\n would be \nexecuted during the millisecond delays in \nblinky_task\n, saving us idle time compared to the first case.\n\n\nNote:\n Defining the same priority for two tasks leads to somewhat undefined behavior and should be avoided.\n\n\nComparing Priority Strategies\n\n\nInstead of stepping through a bunch of changes to our blinky app, clone my task lesson application from \ngithub and copy an existing target.\n\n\nChange directory into apps and clone the repository to get our new\nfiles:\n\n\n$ cd apps\n$ git clone https://github.com/bgiori/mynewt_tasks_lesson.git\n\n\n\n\n\nChange directory back to your project root and copy the arduino_blinky target to a new target called task_tgt.\n\n\n$\n \nnewt\n \ntarget\n \ncopy\n \narduino_blinky\n \ntask_tgt\n\n\n\n\n\n\nSet a new app location.\n\n\n$\n \nnewt\n \ntarget\n \nset\n \ntask_tgt\n \napp=apps/mynewt_tasks_lesson\n\n\n\n\n\n\nNow let\u2019s take a look at our new code. First, notice that we have abandoned blinking, instead \nchoosing to use the \nconsole\n \nand \nshell\n to follow our tasks through execution.\n\n\nAdditionally, we have a number of different tasks:\n\n\n\n\n\n\nTask A\n (\na_task\n):\n\n\n\n\nPriority\n: 3 \u2192 2\n\n\nDescription\n: Task A is supposed to represent a task which frequently does a small amount \nof work, such as one which rapidly polls a sensor for data. Much like \nblinky_task\n, Task A will \nloop 10,000 times then wait 1 millisecond. Priority is changed by \ntimer_task\n after the first simulation.\n\n\n\n\n\n\n\n\nTask B\n (\nb_task\n):\n\n\n\n\nPriority\n: 2 \u2192 3\n\n\nDescription\n: Task B is supposed to represent a task which does a lar ge amount of work \nrelatively infrequently, such as one which sends/receives data from the cloud. Like work_task, \nTask B will loop 1,000,000 times then wait 3 seconds. Priority is changed by timer_task after \nthe first simulation.\n\n\n\n\n\n\n\n\nTimer Task\n (\ntimer_task\n):\n\n\n\n\nPriority\n: 1\n\n\nDescription\n: With default settings, Timer Task will wait 20 seconds then print the first \nsimulations data for Task A and B. Timer task will then swap A and B\u2019s priorities and restart the \nsimulation. After the second simulation, timer will again print simulation data then compare the \ntwo and calculate a final speedup (simulation2 / simulation1).\n\n\n\n\n\n\n\n\nShell Task\n:\n\n\n\n\nPriority\n: 0\n\n\nDescription\n: Task used by Shell behind the scenes to communicate with the serial port.\n\n\n\n\n\n\n\n\nConnecting to the Serial Console\n\n\nBefore running our new app, we must first connect to the serial console. First make sure the \nmynewt_arduino_zero reposito ry is set to the develop branch. (Remove once changes have been \nmoved to master). \n\n\n$ cd repos/mynewt_arduino_zero\n$ git checkout develop\n\n\n\n\n\nYou should already be familiar with the \nSerial Port Setup and Configuration\n, but if\nyou're not, you can go there now and then come back. \n\n\nOutput Analysis\n\n\nRun our new target, task_tgt, and you should see an output similar to this:\n\n\nStarting First Simulation...\n1: Task B: 0% \n78: Task B: 1% \n155: Task B: 2% \n257: Task B: 3% \n359: Task B: 4% \n461: Task B: 5% \n\n\nsnip\n\n\n========== Timer Expired ==========\n\n \n Task A \n\n Priority: 3\n Loop count: 162849\n Cycle count: 16.28\n Run time: 1.40 sec\n\n \n Task B \n\n Priority: 2\n Loop count: 1345852\n Cycle count: 1.34\n Run time: 17.0 sec\n\n Total loops: 1508709\n\n20023: Switching priorities and restarting...\n20111: Task A looped\n20113: Task B: 0% \n20191: Task B: 1% \n20297: Task A looped\n20356: Ta sk B: 2% \n20483: Task A looped\n20545: Task B: 3% \n20669: Task A looped\n20734: Task B: 4% \n20855: Task A looped\n20923: Task B: 5% \n\n\nsnip\n\n\n========== Timer Expired ==========\n\n \n Task A \n\n Priority: 2\n Loop count: 1080000\n Cycle count: 108.0\n Run time: 9.28 sec\n\n \n Task B \n\n Priority: 3\n Loop count: 830356\n Cycle count: 0.83\n Run time: 10.72 sec\n\n Total loops: 1910404\n\n40058:\n\n Final Speedup (Sim2 / Sim1): 1.26\n\n\n\n\n\nThe console output reaffirms our previous prediction and makes both the scheduling differences \nand subsequent efficiency boost far more apparent. Let\u2019s take a look at scheduling differences \nbefore we delve into efficiency.\n\n\nIn the first case, where Task B\u2019s priority is higher than that of Task A, we see A get starved \nby Task B\u2019s long execution time. \nStarvation\n occurs when one task hogs the processor, essentially \n\u201cstarving\u201d other tasks which also need to run. At the end of the first 20 second simulation period, \nTask A has only run for 1.4 seconds compared to task B\u2019s 17 second running time \u2013 ouch. As explained \nbefore, processes which are expected to run for long periods of time (e.g. network communication, \ndata processing) should be given higher priorities in order to combat starvation.\n\n\nIn the second simulation with priorities swapped, we can see Task B only running during the \nmillisecond delays when Task A is \nsleeping\n. Although having Task B only run during these \ndelays slows its execution time, we benefit from un-starving Task A and using the processor \nat a higher efficiency.\n\n\nThe bottom line speedup gives us an immediate and clear indication that we have improved our \nability to process work (i.e throughput). In our second run, we processed an additional 400,000 \nloop iterations, equating to a 26% increase in efficiency. On a standard multi-core processor \nfound in every modern PC, a 1.26 speedup would b e an ok result to adding multithreading capabilities \nto a serial program. However, we accomplished this by simply setting priorities on a single core \nprocessor \u2013 not bad!\n\n\nNOTE: Usually the the term \u201cspeedup\u201d is used within a parallel programming context and refers \nto the change in execution time between a serial and parallel program executing over the same \nproblem. In this case we\u2019re using the term loosely to illustrate the priority change\u2019s effect \non scheduling and throughput in our specific context.\n\n\nEfficiency Isn\u2019t Everything\n\n\nUsing the processor during every OS tick isn\u2019t always the best course of action. If we modify \nTask A\u2019s delay to a tenth of a millisecond and turn off the console output, we can boost our \nspeedup to 1.44. This, however, reduces our ability to process work from Task B who ends up \nonly completing 18% of its work cycle after the second simulation. That would mean, at that \nrate, Task B would take over a minute to finish one cycle.\n\n\nFeel free to play around with the testing parameters to study the different changes yourself!\n\n\nConclusion\n\n\nMoving forward, tasks are just the tip of the iceberg. The \nscheduler\n, \n\nevent queues\n, \n\nsemaphores\n, and \n\nmutexes\n also add to tasks functionality, \nincreasing our ability as the developer to control greater numbers of tasks more intricately. For \nexample, when we switch the tasks priority, we have to tell the scheduler that our tasks priorities \nhave changed, allowing us us to use priorities dynamically. When running multiple tasks, logging \nthrough either the built-in \nLogs\n module \n(not covered in this lesson) or through the serial console/shell can be very useful for debugging \nyour application. In the end, the way you manage your tasks depends on the context of your \napplication. You should assign priorities based on execution time, urgency, and frequency, among \nother things.\n\n\nKeep blinking and happy hacking!", "title": "Tasks and Priority Management" http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/os/tutorials/repo/add_repos/index.html ---------------------------------------------------------------------- diff --git a/develop/os/tutorials/repo/add_repos/index.html b/develop/os/tutorials/repo/add_repos/index.html index 45ae791..0b67cf5 100644 --- a/develop/os/tutorials/repo/add_repos/index.html +++ b/develop/os/tutorials/repo/add_repos/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/os/tutorials/repo/create_repo/index.html ---------------------------------------------------------------------- diff --git a/develop/os/tutorials/repo/create_repo/index.html b/develop/os/tutorials/repo/create_repo/index.html index 5bb92cd..43c83b5 100644 --- a/develop/os/tutorials/repo/create_repo/index.html +++ b/develop/os/tutorials/repo/create_repo/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> @@ -653,8 +661,8 @@ potential options.</p> </li> <li class="pull-right"> - <a href=../../tasks_lesson/> - Next: Tasks and Priority Management + <a href=../private_repo/> + Next: Access a private Repo <span class="fa fa-arrow-right"></span> </a> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/os/tutorials/repo/private_repo/index.html ---------------------------------------------------------------------- diff --git a/develop/os/tutorials/repo/private_repo/index.html b/develop/os/tutorials/repo/private_repo/index.html new file mode 100644 index 0000000..da24125 --- /dev/null +++ b/develop/os/tutorials/repo/private_repo/index.html @@ -0,0 +1,585 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/tutorials/repo/private_repo/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>Access a private Repo - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="Access a private Repo"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0-b1</a> released (Dec 13, 2016) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../tutorials/">Tutorials</a> + + + <ul> + + + + + + + + <li><a href=" + ../../arduino_zero/ +">Project Blinky</a> + + + </li> + + + + + + + + <li ><a href="../add_repos/">Work with repositories</a> + + + <ul> + + + + + + <li > + <a href="../upgrade_repo/">Upgrade a Repo</a> + </li> + + + + + + <li > + <a href="../create_repo/">Turn project into a Repo</a> + </li> + + + + + + <li class="active"> + <a href="./">Access a private Repo</a> + </li> + + + + </ul> + + </li> + + + + + + <li > + <a href="../../tasks_lesson/">Tasks and Priority Management</a> + </li> + + + + + + <li > + <a href="../../wi-fi_on_arduino/">Enable Wi-Fi on Arduino Zero</a> + </li> + + + + + + <li > + <a href="../../unit_test/">Write a Test Suite for a Package</a> + </li> + + + + + + + + <li><a href=" + ../../air_quality_sensor/ +">Air-quality Sensor project</a> + + + </li> + + + + + + <li > + <a href="../../event_queue/">Add task to manage multiple events</a> + </li> + + + + + + + + <li><a href=" + ../../project-slinky/ +">Project Slinky for remote comms</a> + + + </li> + + + + + + <li > + <a href="../../add_newtmgr/">Enable Newt Manager in any app</a> + </li> + + + + + + <li > + <a href="../../add_shell/">Enable the OS Shell and Console</a> + </li> + + + + + + <li > + <a href="../../bletiny_project/">BLE app to check stats via console</a> + </li> + + + + + + + + <li ><a href="../../bleprph/bleprph-intro/">BLE peripheral project</a> + + + </li> + + + + + + <li > + <a href="../../ibeacon/">BLE iBeacon</a> + </li> + + + + + + <li > + <a href="../../blehci_project/">BLE HCI interface</a> + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/develop/os/introduction">Docs</a></li> + + + + <li>» <a href="../../tutorials/">Tutorials</a></li> + + + + <li>» <a href="../add_repos/">Work with repositories</a></li> + + + + <li>» Access a private Repo</li> + + + + </ul> +</div> + </div> + + <h2 id="accessing-a-private-repository">Accessing a private repository</h2> +<p>To access a private repository, newt needs to be configured with one of the following:</p> +<ul> +<li>Access token for the repository</li> +<li>Basic auth login and password for the user</li> +</ul> +<p><strong>NOTE:</strong> To create a github access token, see <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use/"> +https://help.github.com/articles/creating-an-access-token-for-command-line-use/</a></p> +<p>There are two ways to specify this information, as shown below. In +these examples, both a token and a login/password are specified, but you +only need to specify one of these.</p> +<p>1. project.yml (probably world-readable and therefore not secure):</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> repository.my-private-repo: + type: github + vers: 0-dev + user: owner-of-repo + repo: repo-name +<span style="background-color: #ffffcc"> token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' +</span><span style="background-color: #ffffcc"> login: githublogin +</span><span style="background-color: #ffffcc"> password: githubpassword +</span></pre></div> + + +<p>2. $HOME/.newt/repos.yml</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> repository.my-private-repo: +<span style="background-color: #ffffcc"> token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' +</span><span style="background-color: #ffffcc"> login: githublogin +</span><span style="background-color: #ffffcc"> password: githubpassword +</span></pre></div> + + +<p>If both a token and a login+password are specified, newt uses the token. +If both the project.yml file and the private repos.yml file specify +security credentials, newt uses the project.yml settings.</p> +<p><strong>NOTE:</strong> When newt downloads the actual repo content, as +opposed to just the repository.yml file, it does not use the same +mechanism. Instead, it invokes the git command line tool. This is an +annoyance because the user cannot use the same access token for all git +operations. This is something that will be fixed in the future.</p> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../create_repo/> + <span class="fa fa-arrow-left"></span> + Previous: Turn project into a Repo + </a> + + </li> + <li class="pull-right"> + + <a href=../../tasks_lesson/> + Next: Tasks and Priority Management + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/os/tutorials/repo/upgrade_repo/index.html ---------------------------------------------------------------------- diff --git a/develop/os/tutorials/repo/upgrade_repo/index.html b/develop/os/tutorials/repo/upgrade_repo/index.html index d721bf2..d6a9042 100644 --- a/develop/os/tutorials/repo/upgrade_repo/index.html +++ b/develop/os/tutorials/repo/upgrade_repo/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/os/tutorials/tasks_lesson/index.html ---------------------------------------------------------------------- diff --git a/develop/os/tutorials/tasks_lesson/index.html b/develop/os/tutorials/tasks_lesson/index.html index 7d2662b..254c4c7 100644 --- a/develop/os/tutorials/tasks_lesson/index.html +++ b/develop/os/tutorials/tasks_lesson/index.html @@ -847,9 +847,9 @@ other things.</p> <ul class="nav nav-pills" style="margin-bottom: 10px"> <li> - <a href=../repo/create_repo/> + <a href=../repo/private_repo/> <span class="fa fa-arrow-left"></span> - Previous: Turn project into a Repo + Previous: Access a private Repo </a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/develop/sitemap.xml ---------------------------------------------------------------------- diff --git a/develop/sitemap.xml b/develop/sitemap.xml index 0c120ee..3233145 100644 --- a/develop/sitemap.xml +++ b/develop/sitemap.xml @@ -4,7 +4,7 @@ <url> <loc>http://mynewt.apache.org/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -13,7 +13,7 @@ <url> <loc>http://mynewt.apache.org/pages/ble/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -22,7 +22,7 @@ <url> <loc>http://mynewt.apache.org/quick-start/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -30,7 +30,7 @@ <url> <loc>http://mynewt.apache.org/about/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -38,7 +38,7 @@ <url> <loc>http://mynewt.apache.org/talks/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -46,7 +46,7 @@ <url> <loc>http://mynewt.apache.org/download/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -54,7 +54,7 @@ <url> <loc>http://mynewt.apache.org/community/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -62,7 +62,7 @@ <url> <loc>http://mynewt.apache.org/events/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -71,7 +71,7 @@ <url> <loc>http://mynewt.apache.org/os/introduction/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -83,7 +83,7 @@ <url> <loc>http://mynewt.apache.org/os/get_started/vocabulary/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -123,13 +123,13 @@ <url> <loc>http://mynewt.apache.org/faq/how_to_edit_docs/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> <url> <loc>http://mynewt.apache.org/faq/answers/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/mkdocs/search_index.json ---------------------------------------------------------------------- diff --git a/latest/mkdocs/search_index.json b/latest/mkdocs/search_index.json index 779e2f4..057a2c2 100644 --- a/latest/mkdocs/search_index.json +++ b/latest/mkdocs/search_index.json @@ -1046,6 +1046,16 @@ "title": "Resolving dependencies" }, { + "location": "/os/tutorials/repo/private_repo/", + "text": "Accessing a private repository\n\n\nTo access a private repository, newt needs to be configured with one of the following:\n\n\n\n\nAccess token for the repository\n\n\nBasic auth login and password for the user\n\n\n\n\nNOTE:\n To create a github access token, see \n\nhttps://help.github.com/articles/creating-an-access-token-for-command-line-use/\n\n\nThere are two ways to specify this information, as shown below. In\nthese examples, both a token and a login/password are specified, but you\nonly need to specify one of these.\n\n\n1. project.yml (probably world-readable and therefore not secure):\n\n\n repository.my-private-repo:\n type: github\n vers: 0-dev\n user: owner-of-repo\n repo: repo-name\n\n token: \n8ab6433f8971b05c2a9c3341533e8ddb754e404e\n\n\n login: githublogin\n\n password: githubpassword\n\n\n\n\n\n2. $HOME/.newt/repos.yml\n\n\n repository.my-private-repo:\n\n token: \n8ab6433f8971b05 c2a9c3341533e8ddb754e404e\n\n\n login: githublogin\n\n password: githubpassword\n\n\n\n\n\nIf both a token and a login+password are specified, newt uses the token.\nIf both the project.yml file and the private repos.yml file specify\nsecurity credentials, newt uses the project.yml settings.\n\n\nNOTE:\n When newt downloads the actual repo content, as\nopposed to just the repository.yml file, it does not use the same\nmechanism. Instead, it invokes the git command line tool. This is an\nannoyance because the user cannot use the same access token for all git\noperations. This is something that will be fixed in the future.", + "title": "Access a private Repo" + }, + { + "location": "/os/tutorials/repo/private_repo/#accessing-a-private-repository", + "text": "To access a private repository, newt needs to be configured with one of the following: Access token for the repository Basic auth login and password for the user NOTE: To create a github access token, see \nhttps://help.github.com/articles/creating-an-access-token-for-command-line-use/ There are two ways to specify this information, as shown below. In\nthese examples, both a token and a login/password are specified, but you\nonly need to specify one of these. 1. project.yml (probably world-readable and therefore not secure): repository.my-private-repo:\n type: github\n vers: 0-dev\n user: owner-of-repo\n repo: repo-name token: 8ab6433f8971b05c2a9c3341533e8ddb754e404e login: githublogin password: githubpassword 2. $HOME/.newt/repos.yml repository.my-private-repo: token: 8ab6433f8971b05c2a9c3341533e8ddb754e404e login: githublogin password: githubpassword If both a token and a login+password are specified, newt uses the token.\nIf both the project.yml file and the private repos.yml file specify\nsecurity credentials, newt uses the project.yml settings. NOTE: When newt downloads the actual repo content, as\nopposed to just the repository.yml file, it does not use the same\nmechanism. Instead, it invokes the git command line tool. This is an\nannoyance because the user cannot use the same access token for all git\noperations. This is something that will be fixed in the future.", + "title": "Accessing a private repository" + }, + { "location": "/os/tutorials/tasks_lesson/", "text": "Core OS Lesson: Tasks and Priority Management\n\n\nTarget Platform: Arduino M0 Pro\n (or legacy Arduino Zero or Zero Pro, but not Arduino M0)\n\n\nThis lesson is designed to teach core OS concepts and strategies encountered when \nbuilding applications using Mynewt. Specifically, this lesson will cover tasks, \nsimple multitasking, and priority management running on an Arduino M0 Pro.\n\n\nPrerequisites\n\n\nBefore starting, you should read about Mynewt in the \nIntroduction\n \nsection and complete the \nQuickStart\n \nguide and the \nBlinky\n tutorial. \nFurthermore, it may be helpful to take a peek at the \ntask documentation\n \nfor additional insights.\n\n\nEquipment\n\n\nYou will need the following equipment:\n\n\n\n\nArduino M0 Pro (or legacy Arduino Zero or Zero Pro, but not Arduino M0)\n\n\nComputer with Mynewt installed\n\n\nUSB to Micro USB Cable\n\n\n\n\nBuild Your Application\n\n\nTo save time, we will simply modify the Blinky app. We'll add the Tas k Management code to\nthe Blinky app. Follow the \nArduino Zero Blinky tutorial\n \nto create a new project and build your bootloader and application. Finally, build and \nload the application to your Arduino to verify that everything is in order. Now let\u2019s get started!\n\n\nCreate a New Task\n\n\nThe purpose of this section is to give an introduction to the important aspects of tasks \nand how to properly initialize them. First, let\u2019s define a second task called \nwork_task\n \nin main.c (located in apps/blinky/src):\n\n\nstruct\n \nos_task\n \nwork_task\n;\n\n\n\n\n\nA task is represented by the \nos_task\n \nstruct which will hold the task\u2019s information (name, state, priority, etc.). A task is made up of two \nmain elements, a task function (also known as a task handler) and a task stack.\n\n\nNext, let\u2019s take a look at what is required to initialize our new task.\n\n\nTask Stack\n\n\nThe task stack is an array of type \nos_stack_t\n which holds the program st ack frames. Mynewt gives \nus the ability to set the stack size for a task giving the application developer room to optimize \nmemory usage. Since we\u2019re not short on memory, our \nblinky_stack\n and \nwork_stack\n are plenty large \nfor the purpose of this lesson. Notice that the elements in our task stack are of type \nos_stack_t\n \nwhich are generally 32 bits, making our entire stack 1024 Bytes.\n\n\n \n#define WORK_STACK_SIZE OS_STACK_ALIGN(256)\n\n\n\n\n\n\nNote: The \nOS_STACK_ALIGN\n macro is used to align the stack based on the hardware architecture.\n\n\nTask Function\n\n\nThe task function is essentially an infinite loop which waits for some \u201cevent\u201d to wake it up. In our \nBlinky app the task function, named \nblinky_task_handler()\n, is initially called when we call \nos_start()\n \nin \nmain()\n. In general, the task function is where the majority of work is done by a task. Let\u2019s write \na task function for \nwork_task\n called \nwork_task_handler()\ n:\n\n\nvoid\n\n\nwork_task_handler\n(\nvoid\n \n*arg\n)\n{\n \nstruct\n \nos_task\n \n*t\n;\n\n \ng_led_pin\n \n=\n \nLED_BLINK_PIN\n;\n \nhal_gpio_init_out\n(\ng_led_pin\n, \n1\n);\n\n \nwhile\n (\n1\n) {\n \nt\n \n=\n \nos_sched_get_current_task\n();\n \nassert\n(\nt-\nt_func\n \n==\n \nwork_task_handler\n);\n \n/* Do work... */\n\n }\n}\n\n\n\n\n\nThe task function is called when the task is initially put into the \nrunning\n state by the scheduler. \nWe use an infinite loop to ensure that the task function never returns. Our assertion that the current \ntask's handler is the same as our task handler is for illustration purposes only and does not need to \nbe in most task functions.\n\n\nTask Priority\n\n\nAs a preemptive, multitasking RTOS, Mynewt decides which tasks to run based on which has a higher \npriority; the highest priority being 0 and the lowest 255. Thus, before initializing our task, we \nmust choose a priority defined as a macro variable.\n\n\nLet\u2019s set the priority of \nwork_task\n to 0, because everyone knows that work is more important than blinking.\n\n\n \n#define WORK_TASK_PRIO (0)\n\n\n\n\n\n\nInitialization\n\n\nTo initialize a new task we use \nos_task_init()\n \nwhich takes a number of arguments including our new task function, stack, and priority. Much like \nblinky_task\n, \nwe\u2019re going to initialize \nwork_task\n inside \ninit_tasks\n to keep our main function clean. We'll set the task stack here and pass it to the \nos_task_init()\n function as well.\n\n\nint\n\n\ninit_tasks\n(\nvoid\n)\n{\n \n/* \u2026 */\n\n \nos_stack_t\n \n*work_stack\n;\n \nwork_stack\n \n=\n \nmalloc\n(\nsizeof\n(\nos_stack_t\n)\n*WORK_STACK_SIZE\n);\n\n \nassert\n(\npstack\n);\n \nos_task_init\n(\nwork_task\n, \nwork\n, \nwork_task_handler\n, \nNULL\n,\n \nWORK_TASK_PRIO\n, \nOS_WAIT_FOREVER\n, \nwork_stack\n,\n \nWORK_STACK_SIZE\n);\n\n \ntasks_initialized\n \n=\n \n1 \n;\n \nreturn\n \n0\n;\n}\n\n\n\n\n\nAnd that\u2019s it! Now run your application using the newt run command.\n\n\n$ newt run arduino_blinky 0.0.0\n\n\n\n\n\nWhen GDB appears press C then Enter to continue and \u2026 \nwait, why doesn't our LED blink anymore?\n\n\nReview\n\n\nBefore we run our new app, let\u2019s review what we need in order to create a task. This is a general case for a new task called mytask:\n\n\n1)\n Define a new task, task stack, and priority:\n\n\n/* My Task */\n\n\nstruct\n \nos_task\n \nmytask\n\n\n/* My Task Stack */\n\n\n#define MYTASK_STACK_SIZE OS_STACK_ALIGN(256)\n\n\nos_stack_t\n \nmytask_stack\n[\nMYTASK_STACK_SIZE\n];\n\n/* My Task Priority */\n\n\n#define MYTASK_PRIO (0)\n\n\n\n\n\n\n2)\n Define task function:\n\n\nvoid\n \n\nmytask_handler\n(\nvoid\n \n*arg\n)\n{\n \nwhile\n (\n1\n) {\n \n/* ... */\n\n }\n}\n\n\n\n\n\n3)\n Initialize task before calling \nos_start()\n:\n\n\nos_task_init\n(\nmytask\n, \nmytask\n, \nmytask_handler\n, \nN ULL\n, \n \nMYTASK_PRIO\n, \nOS_WAIT_FOREVER\n, \nmytask_stack\n,\n \nMYTASK_STACK_SIZE\n);\n\n\n\n\n\nTask Priority, Preempting, and Context Switching\n\n\nA preemptive RTOS is one in which a higher priority task that is \nready to run\n will preempt (i.e. take the \nplace of) the lower priority task which is \nrunning\n. When a lower priority task is preempted by a higher \npriority task, the lower priority task\u2019s context data (stack pointer, registers, etc.) is saved and the new \ntask is switched in.\n\n\nIn our example, \nwork_task\n has a higher priority than \nblinky_task\n and, because it is never put into a \n\nsleep\n state, holds the processor focus on its context. Let\u2019s give \nwork_task\n a delay and some simulated \nwork to keep it busy. Because the delay is measured in os ticks, the actual number of ticks per second is \ndependent on the board. Therefore, we multiply \nOS_TICKS_PER_SEC\n, which is defined in the MCU, by the \nnumber of s econds we wish to delay.\n\n\nvoid\n\n\nwork_task_handler\n(\nvoid\n \n*arg\n)\n{\n \nstruct\n \nos_task\n \n*t\n;\n\n \ng_led_pin\n \n=\n \nLED_BLINK_PIN\n;\n \nhal_gpio_init_out\n(\ng_led_pin\n, \n1\n);\n\n \nwhile\n (\n1\n) {\n \nt\n \n=\n \nos_sched_get_current_t\n:ask\n();\n \nassert\n(\nt-\nt_func\n \n==\n \nwork_task_handler\n);\n \n/* Do work... */\n\n \nint\n \ni\n;\n \nfor\n(\ni\n \n=\n \n0\n; \ni\n \n \n1000000\n; \n++i\n) {\n \n/* Simulate doing a noticeable amount of work */\n\n \nhal_gpio_set\n(\ng_led_pin\n);\n }\n \nos_time_delay\n(\n3\n*OS_TICKS_PER_SECOND\n);\n }\n}\n\n\n\n\n\nIn order to notice the LED changing, modify the time delay in \nblinky_task_handler()\n to blink at a higher frequency.\n\n\nos_time_delay\n(\nOS_TICKS_PER_SEC/\n10\n);\n\n\n\n\n\nBefore we run the app, let\u2019s predict the behavior. With the newest additions to \nwork_task_handler()\n, \nour first action will be to sleep for three seconds. This will allow \nblinky_task\n to take over the CPU \nand blink to its heart\u2019s content. After three seconds, \nwork_task\n will wake up and be made \nready to run\n, \ncausing it to preempt \nblinky_task\n. The LED will then remain lit for a short period while \nwork_task\n \nloops, then blink again for another three seconds while \nwork_task\n sleeps. \n\n\nVoila, you should see that our prediction was correct! \n\n\nPriority Management Considerations\n\n\nWhen projects grow in scope, from blinking LEDs into more sophisticated applications, the number of \ntasks needed increases alongside complexity. It remains important, then, that each of our tasks is \ncapable of doing its work within a reasonable amount of time.\n\n\nSome tasks, such as the Shell task, execute quickly and require almost instantaneous response. Therefore, \nthe Shell task should be given a high priority. On the other hand, tasks which may be communicating over \na networ k, or processing data, should be given a low priority in order to not hog the CPU.\n\n\nThe diagram below showcases the different scheduling patterns we. would expect from swapping blinky and \nwork tasks priorities.\n\n\n\n\nIn the second case where \nblinky_task\n has a higher priority, the \u201cwork\u201d done by \nwork_task\n would be \nexecuted during the millisecond delays in \nblinky_task\n, saving us idle time compared to the first case.\n\n\nNote:\n Defining the same priority for two tasks leads to somewhat undefined behavior and should be avoided.\n\n\nComparing Priority Strategies\n\n\nInstead of stepping through a bunch of changes to our blinky app, clone my task lesson application from \ngithub and copy an existing target.\n\n\nChange directory into apps and clone the repository to get our new\nfiles:\n\n\n$ cd apps\n$ git clone https://github.com/bgiori/mynewt_tasks_lesson.git\n\n\n\n\n\nChange directory back to your project root and copy the arduino_blinky target to a new target called task_tgt.\n\n\n$\n \nnewt\n \ntarget\n \ncopy\n \narduino_blinky\n \ntask_tgt\n\n\n\n\n\n\nSet a new app location.\n\n\n$\n \nnewt\n \ntarget\n \nset\n \ntask_tgt\n \napp=apps/mynewt_tasks_lesson\n\n\n\n\n\n\nNow let\u2019s take a look at our new code. First, notice that we have abandoned blinking, instead \nchoosing to use the \nconsole\n \nand \nshell\n to follow our tasks through execution.\n\n\nAdditionally, we have a number of different tasks:\n\n\n\n\n\n\nTask A\n (\na_task\n):\n\n\n\n\nPriority\n: 3 \u2192 2\n\n\nDescription\n: Task A is supposed to represent a task which frequently does a small amount \nof work, such as one which rapidly polls a sensor for data. Much like \nblinky_task\n, Task A will \nloop 10,000 times then wait 1 millisecond. Priority is changed by \ntimer_task\n after the first simulation.\n\n\n\n\n\n\n\n\nTask B\n (\nb_task\n):\n\n\n\n\nPriority\n: 2 \u2192 3\n\n\nDescription\n: Task B is supposed to represent a task which does a lar ge amount of work \nrelatively infrequently, such as one which sends/receives data from the cloud. Like work_task, \nTask B will loop 1,000,000 times then wait 3 seconds. Priority is changed by timer_task after \nthe first simulation.\n\n\n\n\n\n\n\n\nTimer Task\n (\ntimer_task\n):\n\n\n\n\nPriority\n: 1\n\n\nDescription\n: With default settings, Timer Task will wait 20 seconds then print the first \nsimulations data for Task A and B. Timer task will then swap A and B\u2019s priorities and restart the \nsimulation. After the second simulation, timer will again print simulation data then compare the \ntwo and calculate a final speedup (simulation2 / simulation1).\n\n\n\n\n\n\n\n\nShell Task\n:\n\n\n\n\nPriority\n: 0\n\n\nDescription\n: Task used by Shell behind the scenes to communicate with the serial port.\n\n\n\n\n\n\n\n\nConnecting to the Serial Console\n\n\nBefore running our new app, we must first connect to the serial console. First make sure the \nmynewt_arduino_zero reposito ry is set to the develop branch. (Remove once changes have been \nmoved to master). \n\n\n$ cd repos/mynewt_arduino_zero\n$ git checkout develop\n\n\n\n\n\nYou should already be familiar with the \nSerial Port Setup and Configuration\n, but if\nyou're not, you can go there now and then come back. \n\n\nOutput Analysis\n\n\nRun our new target, task_tgt, and you should see an output similar to this:\n\n\nStarting First Simulation...\n1: Task B: 0% \n78: Task B: 1% \n155: Task B: 2% \n257: Task B: 3% \n359: Task B: 4% \n461: Task B: 5% \n\n\nsnip\n\n\n========== Timer Expired ==========\n\n \n Task A \n\n Priority: 3\n Loop count: 162849\n Cycle count: 16.28\n Run time: 1.40 sec\n\n \n Task B \n\n Priority: 2\n Loop count: 1345852\n Cycle count: 1.34\n Run time: 17.0 sec\n\n Total loops: 1508709\n\n20023: Switching priorities and restarting...\n20111: Task A looped\n20113: Task B: 0% \n20191: Task B: 1% \n20297: Task A looped\n20356: Ta sk B: 2% \n20483: Task A looped\n20545: Task B: 3% \n20669: Task A looped\n20734: Task B: 4% \n20855: Task A looped\n20923: Task B: 5% \n\n\nsnip\n\n\n========== Timer Expired ==========\n\n \n Task A \n\n Priority: 2\n Loop count: 1080000\n Cycle count: 108.0\n Run time: 9.28 sec\n\n \n Task B \n\n Priority: 3\n Loop count: 830356\n Cycle count: 0.83\n Run time: 10.72 sec\n\n Total loops: 1910404\n\n40058:\n\n Final Speedup (Sim2 / Sim1): 1.26\n\n\n\n\n\nThe console output reaffirms our previous prediction and makes both the scheduling differences \nand subsequent efficiency boost far more apparent. Let\u2019s take a look at scheduling differences \nbefore we delve into efficiency.\n\n\nIn the first case, where Task B\u2019s priority is higher than that of Task A, we see A get starved \nby Task B\u2019s long execution time. \nStarvation\n occurs when one task hogs the processor, essentially \n\u201cstarving\u201d other tasks which also need to run. At the end of the first 20 second simulation period, \nTask A has only run for 1.4 seconds compared to task B\u2019s 17 second running time \u2013 ouch. As explained \nbefore, processes which are expected to run for long periods of time (e.g. network communication, \ndata processing) should be given higher priorities in order to combat starvation.\n\n\nIn the second simulation with priorities swapped, we can see Task B only running during the \nmillisecond delays when Task A is \nsleeping\n. Although having Task B only run during these \ndelays slows its execution time, we benefit from un-starving Task A and using the processor \nat a higher efficiency.\n\n\nThe bottom line speedup gives us an immediate and clear indication that we have improved our \nability to process work (i.e throughput). In our second run, we processed an additional 400,000 \nloop iterations, equating to a 26% increase in efficiency. On a standard multi-core processor \nfound in every modern PC, a 1.26 speedup would b e an ok result to adding multithreading capabilities \nto a serial program. However, we accomplished this by simply setting priorities on a single core \nprocessor \u2013 not bad!\n\n\nNOTE: Usually the the term \u201cspeedup\u201d is used within a parallel programming context and refers \nto the change in execution time between a serial and parallel program executing over the same \nproblem. In this case we\u2019re using the term loosely to illustrate the priority change\u2019s effect \non scheduling and throughput in our specific context.\n\n\nEfficiency Isn\u2019t Everything\n\n\nUsing the processor during every OS tick isn\u2019t always the best course of action. If we modify \nTask A\u2019s delay to a tenth of a millisecond and turn off the console output, we can boost our \nspeedup to 1.44. This, however, reduces our ability to process work from Task B who ends up \nonly completing 18% of its work cycle after the second simulation. That would mean, at that \nrate, Task B would take over a minute to finish one cycle.\n\n\nFeel free to play around with the testing parameters to study the different changes yourself!\n\n\nConclusion\n\n\nMoving forward, tasks are just the tip of the iceberg. The \nscheduler\n, \n\nevent queues\n, \n\nsemaphores\n, and \n\nmutexes\n also add to tasks functionality, \nincreasing our ability as the developer to control greater numbers of tasks more intricately. For \nexample, when we switch the tasks priority, we have to tell the scheduler that our tasks priorities \nhave changed, allowing us us to use priorities dynamically. When running multiple tasks, logging \nthrough either the built-in \nLogs\n module \n(not covered in this lesson) or through the serial console/shell can be very useful for debugging \nyour application. In the end, the way you manage your tasks depends on the context of your \napplication. You should assign priorities based on execution time, urgency, and frequency, among \nother things.\n\n\nKeep blinking and happy hacking!", "title": "Tasks and Priority Management" http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/os/tutorials/repo/add_repos/index.html ---------------------------------------------------------------------- diff --git a/latest/os/tutorials/repo/add_repos/index.html b/latest/os/tutorials/repo/add_repos/index.html index 72b5f0a..1b3dbd8 100644 --- a/latest/os/tutorials/repo/add_repos/index.html +++ b/latest/os/tutorials/repo/add_repos/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/os/tutorials/repo/create_repo/index.html ---------------------------------------------------------------------- diff --git a/latest/os/tutorials/repo/create_repo/index.html b/latest/os/tutorials/repo/create_repo/index.html index cb8c568..c72ea37 100644 --- a/latest/os/tutorials/repo/create_repo/index.html +++ b/latest/os/tutorials/repo/create_repo/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> @@ -653,8 +661,8 @@ potential options.</p> </li> <li class="pull-right"> - <a href=../../tasks_lesson/> - Next: Tasks and Priority Management + <a href=../private_repo/> + Next: Access a private Repo <span class="fa fa-arrow-right"></span> </a> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/os/tutorials/repo/private_repo/index.html ---------------------------------------------------------------------- diff --git a/latest/os/tutorials/repo/private_repo/index.html b/latest/os/tutorials/repo/private_repo/index.html new file mode 100644 index 0000000..4251331 --- /dev/null +++ b/latest/os/tutorials/repo/private_repo/index.html @@ -0,0 +1,585 @@ +<!DOCTYPE html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + + <!-- This is broken by doc revisioning. + <link rel="canonical" href="http://mynewt.apache.org/os/tutorials/repo/private_repo/"> --> + <link rel="shortcut icon" href="../../../../img/favicon.ico"> + + <title>Access a private Repo - Apache Mynewt</title> + + <link href="../../../../css/bootstrap-3.0.3.min.css" rel="stylesheet"> + <link rel="stylesheet" href="../../../../css/highlight.css"> + <link href="../../../../css/base.css" rel="stylesheet"> + <link href="../../../../css/custom.css" rel="stylesheet"> + <link href="../../../../css/v2.css" rel="stylesheet"> + <link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> + <link href="../../../../extra.css" rel="stylesheet"> + + <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> + <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> + <![endif]--> + + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-72162311-1', 'auto'); + ga('send', 'pageview'); + </script> + + </head> + + + <body class="Access a private Repo"> + + + <div class="container"> + <div class="row v2-main-banner"> + <a class="logo-cell" href="/"> + <img class="logo" src="/img/logo.png"> + </a> + <div class="tagline-cell"> + <h4 class="tagline">An OS to build, deploy and securely manage billions of devices</h4> + </div> + <div class="news-cell"> + <div class="well"> + <h4>Latest News:</h4> <a href="/download">Apache Mynewt 1.0.0-b1</a> released (Dec 13, 2016) + </div> + </div> + </div> +</div> + + + + + + + + +<nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> + <div class="container"> + <!-- Collapsed navigation --> + <div class="navbar-header"> + <!-- Expander button --> + <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + + </div> + + <!-- Expanded navigation --> + <div class="navbar-collapse collapse"> + <!-- Main navigation --> + <ul class="nav navbar-nav navbar-right"> + <li + class="" +> + <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> + </li> + <li + class="important" +> + <a href="/quick-start/">Quick Start</a> + </li> + <li + class="" +> + <a href="/about/">About</a> + </li> + <li + class="" +> + <a href="/talks/">Talks</a> + </li> + <li + class="active" +> + <a href="/latest/os/introduction">Documentation</a> + </li> + <li + class="" +> + <a href="/download/">Download</a> + </li> + <li + class="" +> + <a href="/community/">Community</a> + </li> + <li + class="" +> + <a href="/events/">Events</a> + </li> + </ul> + + <!-- Search, Navigation and Repo links --> + <ul class="nav navbar-nav navbar-right"> + + </ul> + </div> + </div> +</nav> + + + + <div class="container"> + + <div class="row"> + <div class="col-md-3 v2-sidebar sidebar-container"><div id="docSidebar" class="hidden-print" role="complementary"> + <div class="top"> + <div role="search"> + <form id="rtd-search-form" class="wy-form" action="../../../../search.html" method="get"> + <div class="form-group"> + <input type="text" name="q" class="form-control" placeholder="Search documentation" /> + </div> + </form> + </div> + </div> + <ul class="toc-nav"> + <li class="doc-version"> +<select class="form-control" onchange="if (this.value) window.location.href=this.value"> + + <option + value="/develop/os/introduction" + selected="selected" + > + Version: develop (latest) + </option> + + <option + value="/v0_9_0/os/introduction" + + > + Version: 0.9.0 + </option> + +</select> +</li> + + + + + + + + + + + + + + + + + + + + + + <li ><a href="../../../introduction/">Mynewt Documentation</a> + + + <ul> + + + + + + + + <li ><a href="../../../get_started/get_started/">Basic Setup</a> + + + </li> + + + + + + <li > + <a href="../../../get_started/vocabulary/">Concepts</a> + </li> + + + + + + + + <li ><a href="../../tutorials/">Tutorials</a> + + + <ul> + + + + + + + + <li><a href=" + ../../arduino_zero/ +">Project Blinky</a> + + + </li> + + + + + + + + <li ><a href="../add_repos/">Work with repositories</a> + + + <ul> + + + + + + <li > + <a href="../upgrade_repo/">Upgrade a Repo</a> + </li> + + + + + + <li > + <a href="../create_repo/">Turn project into a Repo</a> + </li> + + + + + + <li class="active"> + <a href="./">Access a private Repo</a> + </li> + + + + </ul> + + </li> + + + + + + <li > + <a href="../../tasks_lesson/">Tasks and Priority Management</a> + </li> + + + + + + <li > + <a href="../../wi-fi_on_arduino/">Enable Wi-Fi on Arduino Zero</a> + </li> + + + + + + <li > + <a href="../../unit_test/">Write a Test Suite for a Package</a> + </li> + + + + + + + + <li><a href=" + ../../air_quality_sensor/ +">Air-quality Sensor project</a> + + + </li> + + + + + + <li > + <a href="../../event_queue/">Add task to manage multiple events</a> + </li> + + + + + + + + <li><a href=" + ../../project-slinky/ +">Project Slinky for remote comms</a> + + + </li> + + + + + + <li > + <a href="../../add_newtmgr/">Enable Newt Manager in any app</a> + </li> + + + + + + <li > + <a href="../../add_shell/">Enable the OS Shell and Console</a> + </li> + + + + + + <li > + <a href="../../bletiny_project/">BLE app to check stats via console</a> + </li> + + + + + + + + <li ><a href="../../bleprph/bleprph-intro/">BLE peripheral project</a> + + + </li> + + + + + + <li > + <a href="../../ibeacon/">BLE iBeacon</a> + </li> + + + + + + <li > + <a href="../../blehci_project/">BLE HCI interface</a> + </li> + + + + </ul> + + </li> + + + + + + + + <li ><a href="../../../os_user_guide/">OS User Guide</a> + + + </li> + + + + + + + + <li><a href=" + ../../../../network/ble/ble_intro/ +">BLE User Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newt/newt_intro/">Newt Tool Guide</a> + + + </li> + + + + + + + + <li ><a href="../../../../newtmgr/overview/">Newt Manager Guide</a> + + + </li> + + + + </ul> + + </li> + + + + + + + + <li><a href=" + ../../../../faq/how_to_edit_docs/ +">Appendix</a> + + + </li> + + + + </ul> +</div></div> + + <div class="col-md-9" role="main"> + <div class="doc-header"> + <div role="navigation" aria-label="breadcrumbs navigation"> + <ul class="wy-breadcrumbs pull-right"> + <li><a href="/latest/os/introduction">Docs</a></li> + + + + <li>» <a href="../../tutorials/">Tutorials</a></li> + + + + <li>» <a href="../add_repos/">Work with repositories</a></li> + + + + <li>» Access a private Repo</li> + + + + </ul> +</div> + </div> + + <h2 id="accessing-a-private-repository">Accessing a private repository</h2> +<p>To access a private repository, newt needs to be configured with one of the following:</p> +<ul> +<li>Access token for the repository</li> +<li>Basic auth login and password for the user</li> +</ul> +<p><strong>NOTE:</strong> To create a github access token, see <a href="https://help.github.com/articles/creating-an-access-token-for-command-line-use/"> +https://help.github.com/articles/creating-an-access-token-for-command-line-use/</a></p> +<p>There are two ways to specify this information, as shown below. In +these examples, both a token and a login/password are specified, but you +only need to specify one of these.</p> +<p>1. project.yml (probably world-readable and therefore not secure):</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> repository.my-private-repo: + type: github + vers: 0-dev + user: owner-of-repo + repo: repo-name +<span style="background-color: #ffffcc"> token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' +</span><span style="background-color: #ffffcc"> login: githublogin +</span><span style="background-color: #ffffcc"> password: githubpassword +</span></pre></div> + + +<p>2. $HOME/.newt/repos.yml</p> +<div class="codehilite" style="background: #ffffff"><pre style="line-height: 125%"> repository.my-private-repo: +<span style="background-color: #ffffcc"> token: '8ab6433f8971b05c2a9c3341533e8ddb754e404e' +</span><span style="background-color: #ffffcc"> login: githublogin +</span><span style="background-color: #ffffcc"> password: githubpassword +</span></pre></div> + + +<p>If both a token and a login+password are specified, newt uses the token. +If both the project.yml file and the private repos.yml file specify +security credentials, newt uses the project.yml settings.</p> +<p><strong>NOTE:</strong> When newt downloads the actual repo content, as +opposed to just the repository.yml file, it does not use the same +mechanism. Instead, it invokes the git command line tool. This is an +annoyance because the user cannot use the same access token for all git +operations. This is something that will be fixed in the future.</p> + + <div class="row"> + + + + +<ul class="nav nav-pills" style="margin-bottom: 10px"> + <li> + + <a href=../create_repo/> + <span class="fa fa-arrow-left"></span> + Previous: Turn project into a Repo + </a> + + </li> + <li class="pull-right"> + + <a href=../../tasks_lesson/> + Next: Tasks and Priority Management + <span class="fa fa-arrow-right"></span> + </a> + + </li> +</ul> + </div> + <footer class="row"> + <div class="col-xs-12"> + + <p class="copyright">Apache Mynewt (incubating) is available under Apache License, version 2.0.</p> + + </div> + <div class="col-xs-12"> + <div class="logos"> + <img src="/img/asf_logo_wide_small.png" alt="Apache" title="Apache"> + <small class="footnote"> + MyNewt is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + </small> + <img src="/img/egg-logo2.png" alt="Apache Incubator" title="Apache Incubator"> + </div> + </div> +</footer> + </div> + </div> + + + </div> + + <script src="../../../../js/jquery-1.10.2.min.js"></script> + <script src="../../../../js/bootstrap-3.0.3.min.js"></script> + <script src="../../../../js/highlight.pack.js"></script> + <script src="../../../../js/base.js"></script> + <script src="../../../../js/custom.js"></script> + + </body> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/os/tutorials/repo/upgrade_repo/index.html ---------------------------------------------------------------------- diff --git a/latest/os/tutorials/repo/upgrade_repo/index.html b/latest/os/tutorials/repo/upgrade_repo/index.html index 93af14e..b674b0c 100644 --- a/latest/os/tutorials/repo/upgrade_repo/index.html +++ b/latest/os/tutorials/repo/upgrade_repo/index.html @@ -268,6 +268,14 @@ + + + <li > + <a href="../private_repo/">Access a private Repo</a> + </li> + + + </ul> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/os/tutorials/tasks_lesson/index.html ---------------------------------------------------------------------- diff --git a/latest/os/tutorials/tasks_lesson/index.html b/latest/os/tutorials/tasks_lesson/index.html index aeeb4eb..b1a1de5 100644 --- a/latest/os/tutorials/tasks_lesson/index.html +++ b/latest/os/tutorials/tasks_lesson/index.html @@ -847,9 +847,9 @@ other things.</p> <ul class="nav nav-pills" style="margin-bottom: 10px"> <li> - <a href=../repo/create_repo/> + <a href=../repo/private_repo/> <span class="fa fa-arrow-left"></span> - Previous: Turn project into a Repo + Previous: Access a private Repo </a> </li> http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/b4077d02/latest/sitemap.xml ---------------------------------------------------------------------- diff --git a/latest/sitemap.xml b/latest/sitemap.xml index 0c120ee..3233145 100644 --- a/latest/sitemap.xml +++ b/latest/sitemap.xml @@ -4,7 +4,7 @@ <url> <loc>http://mynewt.apache.org/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -13,7 +13,7 @@ <url> <loc>http://mynewt.apache.org/pages/ble/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -22,7 +22,7 @@ <url> <loc>http://mynewt.apache.org/quick-start/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -30,7 +30,7 @@ <url> <loc>http://mynewt.apache.org/about/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -38,7 +38,7 @@ <url> <loc>http://mynewt.apache.org/talks/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -46,7 +46,7 @@ <url> <loc>http://mynewt.apache.org/download/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -54,7 +54,7 @@ <url> <loc>http://mynewt.apache.org/community/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -62,7 +62,7 @@ <url> <loc>http://mynewt.apache.org/events/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -71,7 +71,7 @@ <url> <loc>http://mynewt.apache.org/os/introduction/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -83,7 +83,7 @@ <url> <loc>http://mynewt.apache.org/os/get_started/vocabulary/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> @@ -123,13 +123,13 @@ <url> <loc>http://mynewt.apache.org/faq/how_to_edit_docs/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url> <url> <loc>http://mynewt.apache.org/faq/answers/</loc> - <lastmod>2017-02-08</lastmod> + <lastmod>2017-02-13</lastmod> <changefreq>daily</changefreq> </url>