Code Monkey home page Code Monkey logo

Comments (11)

hnhoan avatar hnhoan commented on September 18, 2024

Open the file nrf_svc.h in the softdevice headers of the SDK, change the line 55
from
#define GCC_CAST_CPP (uint8_t)
to
#define GCC_CAST_CPP (uint16_t)

from ehal.

peti634 avatar peti634 commented on September 18, 2024

Cool, it is work!
Thank you!

from ehal.

peti634 avatar peti634 commented on September 18, 2024

I have built a "blinky" project, but it doesnt work.

IOPinConfig(0, 11, 0, IOPINDIR_OUTPUT,0, 0);
IOPinSet(0, 11);

while (true)
{
}

I have built same project in uVision:

  nrf_gpio_cfg_output(11);
  nrf_gpio_pin_write(11, 1);
  while (true)
  {
  }

But it is work.

from ehal.

hnhoan avatar hnhoan commented on September 18, 2024

Do you see it flashing with this ?

	while (1)
	{
		IOPinSet(0, 11);
		msDelay(250);
		IOPinClear(0, 11);
		msDelay(250);
	}

from ehal.

peti634 avatar peti634 commented on September 18, 2024

No.
It looks like that processor not starting, because the PIN is floating, I cant measure GND or VCC on this pin.

from ehal.

hnhoan avatar hnhoan commented on September 18, 2024

Are you running from within Eclipse ? If not compile the Release build instead. Debug build enabled the semihosting which requires you to run with the debugger which mean you need to run it with Eclipse debug configuration. The Release build is configured for free running.

from ehal.

peti634 avatar peti634 commented on September 18, 2024

No, I not running in Ecliplse, only use the J-link and J-flash.
Which NRF SDK do you recommend?

from ehal.

hnhoan avatar hnhoan commented on September 18, 2024

As I said, you need to compile the Release build for that to use outside of Eclipse.
SDK12 is the last available for nRF51 series. nRF51 is at end of life.

from ehal.

peti634 avatar peti634 commented on September 18, 2024

The problem is same.

I use the nRF5_SDK_12.3.0_d7731ad
Change the GCC_CAST_CPP in nrf_svc.h

But I have more problem:
"error: 'min' was not declared in this scope" in src/imu/imu_invn_icm20948.cpp:332 and src/sensors/agm_invn_icm20948.cpp:435
Fix: #define min(a,b) (((a)<(b))?(a):(b))

"sorry, unimplemented: non-trivial designated initializers not supported" in
ARM/Nordic/src/blueio_blesrvc.cpp: 86, 139, 193, 257
ARM/Nordic/src/uart_bleintrf.cpp: 90, 165
Fix:
From:

const BleSrvcCfg_t s_BlueIOIoSrvcCfg = {
	.SecType = BLESRVC_SECTYPE_NONE,		// Secure or Open service/char
	.UuidBase = BLUEIO_UUID_BASE,			// Base UUID
	.UuidSvc = BLUEIO_UUID_IO_SERVICE,			// Service UUID
	....

To:

const BleSrvcCfg_t s_BlueIOIoSrvcCfg = {
	.SecType = BLESRVC_SECTYPE_NONE,		// Secure or Open service/char
	.UuidBase = BLUEIO_UUID_BASE,			// Base UUID
	.NbUuidBase = 16,
	.UuidSvc = BLUEIO_UUID_IO_SERVICE,			// Service UUID

Is it correct?
Thank you!

from ehal.

hnhoan avatar hnhoan commented on September 18, 2024

"error: 'min' was not declared in this scope" in src/imu/imu_invn_icm20948.cpp:332 and src/sensors/agm_invn_icm20948.cpp:435

Not sure why you get this error. the min/max are define in istddef.h of IOsonata/include. I did not get that error when I compiled.

the s_BlueIOIoSrvcCfg should be

const BleSrvcCfg_t s_BlueIOIoSrvcCfg = {
	.SecType = BLESRVC_SECTYPE_NONE,		// Secure or Open service/char
	.UuidBase = {BLUEIO_UUID_BASE,},			// Base UUID
	.NbUuidBase = 1,
	.UuidSvc = BLUEIO_UUID_IO_SERVICE,			// Service UUID

from ehal.

peti634 avatar peti634 commented on September 18, 2024

Thank you, it works!
After I have do it, and I have build Release.

from ehal.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.