<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Other people&amp;#39;s code doesn&amp;#39;t work in Segger.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99490/other-people-s-code-doesn-t-work-in-segger</link><description>We are currently developing firmware using C language. I have shared the firmware on GitHub, and even though it works fine on other devices, it does not work fine on my PC. Specifically, I am writing a program to control LEDs. All hardware other than</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 May 2023 10:38:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99490/other-people-s-code-doesn-t-work-in-segger" /><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/427179?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 10:38:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4dbf8de-b498-4f92-ab6e-cc1d4a4037c7</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;Hello.&lt;br /&gt;As mentioned in my previous reply, I have added a log before and after toggling the LED and have confirmed that it actually reaches that line and executes. We are not using any Bluetooth connection method.&lt;br /&gt;It is necessary to write the PC program to the board via a connector, but after that, the process proceeds independently of the board.&lt;br /&gt;We will rethink what we can do and try to solve the problem.&lt;br /&gt;Thank you very much for your kind support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/427132?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 08:35:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:349df9ef-aced-45db-a56e-3cbe530486c8</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I would recommend that you try adding some logging to your project if it isn&amp;#39;t already present, and then you can add some logs right before and after the lines that will toggle the LEDs, and see if they are reached. If no luck, perhaps you can run through the Developer Academy tutorial, to see if you notice anything missing in your application:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/"&gt;https://academy.nordicsemi.com/courses/bluetooth-low-energy-fundamentals/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is a Bluetooth Low Energy fundamentals course, but perhaps you can run through the start, to see if you can get an application up and running.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/427060?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 03:06:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81049fad-c70e-430b-9f7a-f15a9f5573b2</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;Currently, the issue has not been resolved. The issue is that the LEDs that should be lit by the switches on the board do not light up when written to the board, even though it is indicated that all the processes on the PC are working properly. We would like to rethink what we can do to solve this problem. Thank you very much for your sincere response to my question, even though it was poorly written.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/426329?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 12:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4df9fff-456b-4f54-87d3-8ddbf284974e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Does that mean that you solved your issue?&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/426202?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:22:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a58ac0a-9717-4590-8717-299ceadd2564</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;When I write to the nrf board on someone else&amp;#39;s PC and press the switch, the LED glows in the indicated color, but when I write on my PC, which has the same specs and the same model number, no change occurs in the LED when I press the switch.&lt;br /&gt;However, debugging has been completed successfully, and I have confirmed that even the main() function is passed normally by LOG.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/426198?ContentTypeID=1</link><pubDate>Fri, 19 May 2023 08:09:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eda9f927-557e-4331-b805-41550f883bdc</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok. So how is it not working on your computer, then? Can you explain in detail where the behavior on your computer differs from the others?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/426036?ContentTypeID=1</link><pubDate>Wed, 17 May 2023 06:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4e7e1d8-45f5-494f-93b5-0845eb2608db</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;Thank you for your reply.&lt;/p&gt;
&lt;p&gt;Does &amp;quot;program&amp;quot; mean &amp;quot;execute&amp;quot;?&lt;/p&gt;
&lt;p&gt;When the program is executed, the LEDs light up red, green, and blue, in that order, at one-second intervals. (Confirmed using another PC).&lt;/p&gt;
&lt;p&gt;We have confirmed that there is no problem, that the main() function has reached its starting position, and that the LOG appended in the main() function has also passed.&lt;/p&gt;
&lt;p&gt;We are using Segger Embedded Studio.&lt;/p&gt;
&lt;p&gt;The version of NCS is as previously commented&lt;/p&gt;
&lt;p&gt;・SDK version 16.0.0&lt;br /&gt;・SDK_for_Mesh version 4.2.0&lt;/p&gt;
&lt;p&gt;and have not been deleted or reinstalled.&lt;br /&gt;However, this version is exactly the same as the one used on the PC on which we confirmed successful operation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/425573?ContentTypeID=1</link><pubDate>Mon, 15 May 2023 10:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:700159c2-2e72-4099-9d3f-ac859f5ae5ae</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Ok.&lt;/p&gt;
&lt;p&gt;Can you tell me what you mean by:&lt;/p&gt;
[quote user=""] it does not work fine on my PC.[/quote]
&lt;p&gt;What happens when you program it? Does any of the LEDs work? Did you try to run a debug session? Is the start of the main() function reached?&lt;/p&gt;
&lt;p&gt;Did you try to delete NCS and re-install it?&lt;/p&gt;
&lt;p&gt;Are you using Segger Embedded Studio?&lt;/p&gt;
&lt;p&gt;What NCS version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/425453?ContentTypeID=1</link><pubDate>Sun, 14 May 2023 12:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68c7ef2a-f35e-41d6-bcdf-4180eaf4507e</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;Thank you for your reply. After reading your comment, I thought about it, but the folder containing the main.c file contains various confidential information, so I am unable to upload the file. I may be able to provide the path to where the file is located.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/424896?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 13:37:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fb814a5-244c-49af-baf9-edc7a6a11823</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;This is your main.c file. You need to zip the folder that main.c is found in and upload it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/424709?ContentTypeID=1</link><pubDate>Wed, 10 May 2023 06:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f0badcb4-1bb7-4afc-98f3-e185422e3a3c</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;I am able to open it in segger. I can build without error, I can program to DK. However, the application is not working.&lt;br /&gt;The code is attached below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;

#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;string.h&amp;gt;

/* HAL */
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;simple_hal.h&amp;quot;
#include &amp;quot;app_timer.h&amp;quot;

/* Core */
#include &amp;quot;nrf_mesh_config_core.h&amp;quot;
#include &amp;quot;nrf_mesh_gatt.h&amp;quot;
#include &amp;quot;nrf_mesh_configure.h&amp;quot;
#include &amp;quot;nrf_mesh.h&amp;quot;
#include &amp;quot;mesh_stack.h&amp;quot;
#include &amp;quot;device_state_manager.h&amp;quot;
#include &amp;quot;access_config.h&amp;quot;
#include &amp;quot;proxy.h&amp;quot;

/* Provisioning and configuration */
#include &amp;quot;mesh_provisionee.h&amp;quot;
#include &amp;quot;mesh_app_utils.h&amp;quot;

/* Models */
#include &amp;quot;generic_onoff_server.h&amp;quot;

/* Logging and RTT */
#include &amp;quot;log.h&amp;quot;
#include &amp;quot;rtt_input.h&amp;quot;

/* Example specific includes */
#include &amp;quot;app_config.h&amp;quot;
#include &amp;quot;example_common.h&amp;quot;
#include &amp;quot;nrf_mesh_config_examples.h&amp;quot;
#include &amp;quot;light_switch_example_common.h&amp;quot;
#include &amp;quot;app_onoff.h&amp;quot;
#include &amp;quot;ble_softdevice_support.h&amp;quot;

#include &amp;quot;nrf_gpio.h&amp;quot;

#include &amp;quot;bsp_btn_ble.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;
#include &amp;quot;app_button.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;pwm_utils.h&amp;quot;


/*****************************************************************************
 * Definitions
 *****************************************************************************/
// #define ONOFF_SERVER_0_LED          (BSP_LED_0)
#define APP_ONOFF_ELEMENT_INDEX     (0)

/* Controls if the model instance should force all mesh messages to be segmented messages. */
#define APP_FORCE_SEGMENTATION      (false)
/* Controls the MIC size used by the model instance for sending the mesh messages. */
#define APP_MIC_SIZE                (NRF_MESH_TRANSMIC_SIZE_SMALL)

//LED電源とそれぞれの色の点灯に関するピン番号を定義
#define ONOFF_SERVER_R_LED (BSP_LED_0)
#define ONOFF_SERVER_G_LED (BSP_LED_1)
#define ONOFF_SERVER_B_LED (BSP_LED_2)
#define POWER (BSP_LED_3)
// #define POWER NRF_GPIO_PIN_MAP(1, 11)

#define DIPSW_0 (DIPSW_00)
#define DIPSW_1 (DIPSW_01)
#define DIPSW_2 (DIPSW_02)
#define DIPSW_3 (DIPSW_03)

// 忦�なピン番号を定義ED点灯、ブザーなど

// LED電源（青
#define LED_SUPPLY_BLUE NRF_GPIO_PIN_MAP({pin number})
// ↓LED電源（赤�用ピン番号を定義�
#define LED_SUPPLY_RED NRF_GPIO_PIN_MAP({pin number})
// ↓LED電源（緑）用ピン番号を定義�
#define LED_SUPPLY_GREEN NRF_GPIO_PIN_MAP({pin number})



int main(void)

{
    gpio_output_voltage_setup();

    initialize();// 初期化��
    start();// 起動時に行う処�

    nrf_gpio_pin_clear(POWER);
    nrf_gpio_pin_clear(ONOFF_SERVER_R_LED);
    nrf_gpio_pin_clear(ONOFF_SERVER_G_LED);
    nrf_gpio_pin_clear(ONOFF_SERVER_B_LED);                                                                                                          
    
    // // LED POWER ON
    nrf_gpio_cfg_output(BSP_LED_3);

    nrf_gpio_cfg_input(DIPSW_0,NRF_GPIO_PIN_PULLUP);
    nrf_gpio_cfg_input(DIPSW_1,NRF_GPIO_PIN_PULLUP);
    nrf_gpio_cfg_input(DIPSW_2,NRF_GPIO_PIN_PULLUP);
    nrf_gpio_cfg_input(DIPSW_3,NRF_GPIO_PIN_PULLUP);
    // nrf_gpio_cfg_input(BOOL_BATTERY_PLUG,NRF_GPIO_PIN_PULLUP);

    // 設定したピン番号を用ぁ�コンフィグレーション
    nrf_gpio_cfg_output(POWER);
    nrf_gpio_cfg_output(ONOFF_SERVER_R_LED);
    nrf_gpio_cfg_output(ONOFF_SERVER_G_LED);
    nrf_gpio_cfg_output(ONOFF_SERVER_B_LED);

    hal_led_pin_set(ONOFF_SERVER_R_LED, 0); /*R On*/
    hal_led_pin_set(ONOFF_SERVER_G_LED, 0); /*G On*/
    hal_led_pin_set(ONOFF_SERVER_B_LED, 0); /*B On*/

    nrf_gpio_cfg_output(LED_SUPPLY_BLUE);
    nrf_gpio_cfg_output(LED_SUPPLY_RED);
    nrf_gpio_cfg_output(LED_SUPPLY_GREEN);

    hal_led_pin_set(LED_SUPPLY_BLUE, 0); /*R On*/
    hal_led_pin_set(LED_SUPPLY_RED, 0); /*G On*/
    hal_led_pin_set(LED_SUPPLY_GREEN, 0); /*B On*/

    // LED点灯のループ用変数index&amp;quot;など��定義と初期化�変数�=0
    int index = 0;

    while (true)
    {
        //counter=0;
        (void)sd_app_evt_wait();

        // 1秒ごとにLEDの色を�り替えるための条件刲
        while(index &amp;lt; 50 )// 50回ループしたら終�
        {
            // 最初�1秒間は赤のLEDを点灯
            if(index % 3 == 0) // 赤のLED点灯
            {
                hal_led_pin_set(ONOFF_SERVER_R_LED, 0); /*R On*/
                hal_led_pin_set(ONOFF_SERVER_G_LED, 1); /*Off*/
                hal_led_pin_set(ONOFF_SERVER_B_LED, 1); /*Off*/
            }
            else if(index % 3 == 1)// 緑�LED点灯
            {
                hal_led_pin_set(ONOFF_SERVER_R_LED, 1); /*Off*/
                hal_led_pin_set(ONOFF_SERVER_G_LED, 0); /*G On*/
                hal_led_pin_set(ONOFF_SERVER_B_LED, 1); /*Off*/
            }
            else if(index % 3 == 2)// 青�LED点灯
            {
                hal_led_pin_set(ONOFF_SERVER_R_LED, 1); /*Off*/
                hal_led_pin_set(ONOFF_SERVER_G_LED, 1); /*Off*/
                hal_led_pin_set(ONOFF_SERVER_B_LED, 0); /*B On*/
            }

            // ぁ�れにせよ1秒間継続させる
            nrf_delay_ms(1000);

            //�回ループするごとに&amp;quot;index&amp;quot;の値に1�える�
            index = index + 1;
        }
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/424514?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 11:59:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcb0c8b8-3c59-493f-8362-029c85d21cea</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you please upload the application that is not working on your computer, so that I can have a look?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Zip the folder containing the application, and drag n&amp;#39; drop it into the textbox you are writing. Also let me know where you placed your application. Provide the full path of the location of the folder that you zipped, please.&lt;/p&gt;
&lt;p&gt;When you say that it doesn&amp;#39;t work. What does it mean? Are you able to open it in Segger Embedded Studio? Are you able to build it without any errors? Are you able to program it onto your DK? Does the application run?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/424450?ContentTypeID=1</link><pubDate>Tue, 09 May 2023 09:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:069d63ed-5591-4ba2-aa4e-ac8572842857</guid><dc:creator>ryos</dc:creator><description>&lt;p&gt;Both PCs are running Windows 10, SDK version 16.0.0 and SDK_for_Mesh version 4.2.0.&lt;br /&gt;This is the first time this symptom has occurred.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Other people's code doesn't work in Segger.</title><link>https://devzone.nordicsemi.com/thread/424243?ContentTypeID=1</link><pubDate>Mon, 08 May 2023 11:40:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1024954b-036b-40b9-b7c7-90233a36715f</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thank you for reaching out to us for support in DevZone. To ensure that we can assist you in a timely and effective manner, it&amp;#39;s important to provide enough relevant information when submitting a support ticket. Here are some tips:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Start by providing a clear and concise summary of the issue you&amp;#39;re experiencing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Include step-by-step instructions for how to reproduce the issue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attach any relevant logs or screenshots that could help us better understand the issue.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Provide any relevant system information, such as your operating system, browser version, and other software or hardware details.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the issue is intermittent or sporadic, provide a timeline of when it has occurred and how often.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Be as specific as possible in describing the issue, avoiding vague language or broad statements.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;By following these tips, you can help us quickly diagnose and resolve your issue. Please let us know if you have any questions or need further assistance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>