Skip to content

Instantly share code, notes, and snippets.

@maswangy
maswangy / embedded_c_testing_tdd_resources.md
Created September 17, 2021 16:20 — forked from trikitrok/embedded_c_testing_tdd_resources.md
Resources for embedded C testing and TDD
@maswangy
maswangy / modelsim_installation.md
Created June 18, 2019 23:58 — forked from robodhruv/modelsim_installation.md
Sorting ModelSim installation issues

ModelSim Installation issues

Ubuntu 14.xx and above

Ignore this if you have not encountered any issue with the installation and running of ModelSim and Quartus on your system. You are very lucky. (Just Kidding! You have surely had this issue, only sorted.)

Hence assuming you have been following the procedure given in this guide. Most certainly, Quartus will install jsut fine, and so will ModelSim. The issue is in launching due to inappropriate linking etc.

Stage 1

This is the simplest error you would encounter. Navigate to the modelsim_ase folder and run:

@maswangy
maswangy / strsep.c
Created July 17, 2018 20:55
this function parses string in c , making up for shortcoming of strtok
#include <stdio.h>
#include <string.h>
char *strsep(char **stringp, const char *delim)
{
char *s;
const char *spanp;
int c, sc;
char *tok;
if ((s = *stringp)== NULL)
@maswangy
maswangy / STM32_EEPROM_Operation.c
Last active March 17, 2018 00:55
Flash/EEPROM operation #stm32 #Flash #EEPROM #C
/**
* @brief EEPROM Buffer Write API
* @param pWriteAddress: Address to Write
* @param pBuf: Pointer to the input buffer.
* @param nBufLen: Input Buffer Size.
* @retval None
*/
void BSP_EEPROM_WriteBuffer(uint32_t pWriteAddress, uint32_t pBuf, uint32_t nBufLen)
{
HAL_FLASHEx_DATAEEPROM_Unlock();