Jump to content
View in the app

A better way to browse. Learn more.

Tinkerunity

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Geschrieben

Hi!

 

Ich hab den Sourcery GCC installiert und versuche die Firmware de Master-Brick zu bauen. Dabei bekomme ich folgenden Fehler:

 

-------------------------------------------------

/tmp/ccW8Lign.s: Assemblerm essages:

 

/tmp/ccW8Lign.s:516: Error: registers may not be the same -- `strexb r0,r0,[r1]'

/tmp/ccW8Lign.s:541: Error: registers may not be the same -- `strexh r0,r0,[r1]'

make[2]: *** [CMakeFiles/master-brick.elf.dir/src/bricklib/drivers/cmsis/core_cm3.obj] Fehler 1

make[1]: *** [CMakeFiles/master-brick.elf.dir/all] Fehler 2

make: *** [all] Fehler 2

-------------------------------------------------

 

Sagt einem von euch das was?

 

MfG

Geschrieben

Hi

 

Ja, den Fehler hatte ich auch, öffne mal deine core_cm3.c und ändere die zwei entsprechenden Funktionen ab. Achtung die sind zweimal deklariert, nimm die zwei ab Zeile 755.

 

/**
* @brief  STR Exclusive (8 bit)
*
* @param  value  value to store
* @param  *addr  address pointer
* @return        successful / failed
*
* Exclusive STR command for 8 bit values
*/
uint32_t __STREXB(uint8_t value, uint8_t *addr)
{
   //uint32_t result=0;
   register uint32_t result asm ("r2"); 
   __ASM volatile ("strexb %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
   return(result);
}

/**
* @brief  STR Exclusive (16 bit)
*
* @param  value  value to store
* @param  *addr  address pointer
* @return        successful / failed
*
* Exclusive STR command for 16 bit values
*/
uint32_t __STREXH(uint16_t value, uint16_t *addr)
{
   //uint32_t result=0;
   register uint32_t result asm ("r2"); 
   __ASM volatile ("strexh %0, %2, [%1]" : "=r" (result) : "r" (addr), "r" (value) );
   return(result);
}

 

Gruß Area

Geschrieben
  • Autor

Hey!

 

Danke für die schnelle Antwort. Dein Patch hat funktioniert.

Er sollte aber auch ins Tinkerforge Git-Repo. ;)

 

MfG

Geschrieben
  • Autor

Ich hab ein Debian Squeeze laufen mit dem neuesten Sourcery GCC, den es bei denen auf der HP gibt.

-----

arm-none-eabi-gcc (Sourcery CodeBench Lite 2011.09-69) 4.6.1

Copyright © 2011 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-----

 

Und die aktuellen Sourcen aus dem GIT-Repository.

Geschrieben

Oh, mir war gar nicht aufgefallen dass das hier der gleiche Fehler ist wie der schon im englischen Forum aufgetreten war. Nach kurzem durchwühlen der GCC ARM inline Assembler Dokumentation bin ich mir nicht sicher ob der Fix von AreaScout funktioniert.

 

Ich hab aber folgendes gefunden;

In situations where your code depends on different registers used for input and output operands, you must add the & constraint modifier to your output operand

 

Kann einer von euch ausprobieren ob der kram mit

"=r" (result)

funktioniert?

 

Falls ja würde ich das einbauen, weil kaputt machen kann das an der Stelle definitiv nichts, höchstens langsamer.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.